Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 向嵌套管线传递参数_Angularjs - Fatal编程技术网

Angularjs 向嵌套管线传递参数

Angularjs 向嵌套管线传递参数,angularjs,Angularjs,我正在开发一款angular应用程序,并尝试实现以下路线: /networks /network/nameofnetwork /network/nameofnetwork/shows /network/nameofnetwork/show/nameofshow 我的问题是,我可以访问所有路由,但唯一被调用的状态参数是网络名称,而不是显示。这是我的模块: angular.module('network',[]) .config(['$stateProvider',function($st

我正在开发一款angular应用程序,并尝试实现以下路线:

/networks
/network/nameofnetwork
/network/nameofnetwork/shows
/network/nameofnetwork/show/nameofshow
我的问题是,我可以访问所有路由,但唯一被调用的状态参数是网络名称,而不是显示。这是我的模块:

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);
}]);

通过在IRC频道聊天,我发现我错过了一个节目