angularjs - Can't get routeparams individualy -


retrieving return successful cant seem attributes individually` 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 works   $scope.statuslabel = somedata; 

`

 myapp.controller('detailscontroller', ['$scope','somedata','$routeparams', function ($scope,somedata, $routeparams)  

wrong sequence of dependency


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -