Angularjs Can';I don’我不能单独得到路线图

Angularjs Can';I don’我不能单独得到路线图,angularjs,routes,Angularjs,Routes,检索返回成功,但似乎无法单独获取属性 var myApp = angular.module('myApp', ['ngGrid', 'ngRoute', "ngAnimate", "ngAria", 'ngMaterial']); myApp.config(['$routeProvider', function ($routeProvider) { $routeProvider. when('/:energyId/:energyChain/:resourceId/:facili

检索返回成功,但似乎无法单独获取属性

var myApp = angular.module('myApp', ['ngGrid', 'ngRoute', "ngAnimate", "ngAria", 'ngMaterial']);

myApp.config(['$routeProvider', function ($routeProvider)
{
    $routeProvider.
    when('/:energyId/:energyChain/:resourceId/:facilityId',
    {
        templateUrl: '/Content/resourceTemplate.html',
        controller: 'detailsController',
        resolve: {
            SomeData: function ($route) {
                return $route.current.params;
            }
        }

    }).
    otherwise({
        redirectTo: '/param1/param1/param1/param1'
    });
}]);

myApp.controller('detailsController', ['$scope', '$routeParams', function ($scope,SomeData, $routeParams) {

    //this doesnt work 
    $scope.statusLabel = SomeData.energyChain;
    //but this works   $scope.statusLabel = SomeData;

依赖项的顺序错误

请通过将对象记录到controllertried中的控制台来查看
$routeParams
对象,很抱歉,它不起作用。问题是访问它。我得到l{“energyId”:“param1”,“energyChain”:“param1”,“resourceId”:“param1”,“facilityId”:“param1”}在记录一些数据时,但当我尝试访问SomeData.energyID时,它不起作用。怎么了
 myApp.controller('detailsController', ['$scope','SomeData','$routeParams', function ($scope,SomeData, $routeParams)