You need to use the full state name for ui-sref, in your case:
<div ng-controller="ctrl-regTemplate">
<ul class="phones">
<li><a ui-sref="regTemplate.rtGenInfo">General Info</a></li>
<li><a ui-sref="regTemplate.rtDataDef">Define Data-fields</a></li>
<li><a ui-sref="regTemplate.rtDocDef">Define Doctypes</a></li>
<li><a ui-sref="regTemplate.rtAddTask">Add Tasks</a></li>
</ul>
</div>
On Tuesday, May 26, 2015 at 12:45:34 AM UTC-4, Nitin Tomer wrote:
>
> Any pointers?
>
> On Thursday, 21 May 2015 12:31:56 UTC+5:30, Nitin Tomer wrote:
>>
>> Thanks that worked. Now I am stuck in another problem. First level view
>>>> is working fine, but nested views aren't. Please check the files to see
>>>> what I am doing wrong -
>>>>
>>>
>> index.html
>>
>> <!DOCTYPE html>
>> <html ng-app="ox-admin" xmlns="http://www.w3.org/1999/xhtml">
>> <head>
>> <script src="Scripts/jquery-1.9.1.js"></script>
>> <script src="Scripts/angular.js"></script>
>> <script src="Scripts/angular-resource.js"></script>
>> <script src="Scripts/angular-route.js"></script>
>> <script src="Scripts/angular-ui-router.min.js"></script>
>> <script src="js/app.js"></script>
>> <script src="js/controllers.js"></script>
>> <link rel="stylesheet" type="text/css" href="Content/bootstrap.css" />
>> <title>OmniExchange - Administrator</title>
>> </head>
>> <body>
>> <div class="container-fluid">
>> <div class="row">
>> <div class="col-md-2">
>> <!--Body content-->
>>
>> <ul class="phones">
>> <li><a ui-sref="regTemplate">Register
>> Template</a></li>
>> <li><a ui-sref="regDevice">Register Device</a></li>
>> <li><a ui-sref="regService">Register Services</a></li>
>> <li><a ui-sref="confAuth">Configure
>> Authentication</a></li>
>> <li><a ui-sref="confInt">Configure
>> Integrations</a></li>
>> </ul>
>>
>> </div>
>> <div class="col-md-10" ui-view>
>>
>> </div>
>> </div>
>> </div>
>> </body>
>> </html>
>>
>> app.js
>>
>> /* App Module */
>>
>> var oxadminApp = angular.module('ox-admin', [
>> 'ui.router',
>> 'oxadminControllers'
>> ]);
>>
>> oxadminApp.config(function($stateProvider, $urlRouterProvider) {
>>
>> $urlRouterProvider.otherwise('/htmls');
>>
>> $stateProvider
>>
>> .state('regTemplate', {
>> url: '/regTemplate',
>> templateUrl: '/htmls/regTemplate.html'
>> })
>>
>> .state('regDevice', {
>> url: '/regDevice',
>> templateUrl: '/htmls/regDevice.html'
>> })
>>
>> .state('regService', {
>> url: '/regService',
>> templateUrl: '/htmls/regService.html'
>> })
>>
>> .state('confAuth', {
>> url: '/confAuth',
>> templateUrl: '/htmls/confAuth.html'
>> })
>>
>> .state('confInt', {
>> url: '/confInt',
>> templateUrl: '/htmls/confInt.html'
>> })
>>
>> .state('regTemplate.rtGenInfo', {
>> url: '/rtGenInfo',
>> templateUrl: '/htmls/rtGenInfo.html'
>> })
>>
>> .state('regTemplate.rtDataDef', {
>> url: '/rtDataDef',
>> templateUrl: '/htmls/rtDataDef.html'
>> })
>>
>> .state('regTemplate.rtDocDef', {
>> url: '/rtDocDef',
>> templateUrl: '/htmls/rtDocDef.html'
>> })
>>
>> .state('regTemplate.rtAddTask', {
>> url: '/rtAddTask',
>> templateUrl: '/htmls/rtAddTask.html'
>> });
>> });
>>
>> regTemplate.html
>>
>> Detailed view for registering templates.
>>
>> <div ng-controller="ctrl-regTemplate">
>> <ul class="phones">
>> <li><a ui-sref=".rtGenInfo">General Info</a></li>
>> <li><a ui-sref=".rtDataDef">Define Data-fields</a></li>
>> <li><a ui-sref=".rtDocDef">Define Doctypes</a></li>
>> <li><a ui-sref=".rtAddTask">Add Tasks</a></li>
>> </ul>
>> </div>
>>
>> <div ui-view></div>
>>
>> Ideally it should show rtGenInfo.html next to the Register Template menu,
>> but it's not doing that.
>>
>> Thanks
>>
>> Nitin
>>
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.