>
> I am using UI-Router thus:
ForumsApp.config( function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/index');
$stateProvider
.state('index', {
url:'/index',
views:{
"carousel":{
templateUrl:
'/Areas/Forums/App/Views/carousel.html',
controller: 'IndexCtrl'
},
"default":{
templateUrl:
'/Areas/Forums/App/Views/list_cats.html',
controller: 'IndexCtrl'
},
"sidebar":{
templateUrl: '/Areas/Forums/App/Views/sidebar.html',
controller: 'SidebarCtrl'
}
}
})
.state('post',{
url:'/post/:subcatId/:subcatName',
views:{
"carousel":{
templateUrl:
'/Areas/Forums/App/Views/threads_header.html',
controller: 'ThreadsCtrl'
},
"default":{
templateUrl:
'/Areas/Forums/App/Views/list_posts.html',
controller: 'ThreadsCtrl'
},
"sidebar":{
templateUrl: '/Areas/Forums/App/Views/sidebar.html',
controller: 'SidebarCtrl'
}
}
})
.state('read',{
url:'/read/:postId/:postTitle',
views:{
"carousel":{
templateUrl:
'/Areas/Forums/App/Views/threads_header.html',
controller: 'ReadCtrl'
},
"default":{
templateUrl:
'/Areas/Forums/App/Views/read_post.html',
controller: 'ReadCtrl'
},
"sidebar":{
templateUrl: '/Areas/Forums/App/Views/sidebar.html',
controller: 'SidebarCtrl'
}
}
})
})
and that is the only place i have my controllers defined.
They are not attached to the views.
Thanks
--
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.