I am working on an angular app and I am trying to achieve the following
routes:
/networks/network/nameofnetwork/network/nameofnetwork/shows/network/nameofnetwork/show/nameofshow
my problem is that I can get to all of the routes but the only state param
that is being called is the parent's but not the show. Also none of my
other controllers are being called. Heres my module:
angular.module('network',[])
.config(['$stateProvider',function($stateProvider){
$stateProvider
.state('networks',{
url: '/networks',
templateUrl:'/templates/network/networks.tpl.html',
controller: 'ViewNetworksCtrl'
})
.state('network',{
url: '/network/:username',
templateUrl:'/templates/network/network.tpl.html',
controller: 'ViewNetworkCtrl'
})
.state('network.schedule',{
url: '/schedule',
templateUrl:'/templates/network/schedule.tpl.html',
controller: 'NetworkScheduleCtrl'
})
.state('network.shows',{
url: '/shows',
templateUrl:'/templates/network/shows.tpl.html',
controller: 'NetworkShowsCtrl'
})
.state('network.show',{
url: '/show/:slug',
templateUrl:'/templates/network/show.tpl.html',
controller: 'NetworkShowCtrl'
});
}])
.controller('ViewNetworksCtrl',['$scope',function($scope){}]).controller('ViewNetworkCtrl',['$scope','$stateParams',function($scope,
$stateParams){
console.log($stateParams);
}]).controller('NetworkScheduleCtrl',['$scope',function($scope){}]).controller('NetworkShowsCtrl',['$scope',function($scope){}]).controller('NetworkShowCtrl',['$scope','$stateParams',function($scope,
$stateParams){
console.log($stateParams);}]);
--
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.