Angular $routeParams is blank

后端 未结 7 1038
不知归路
不知归路 2021-02-19 03:49

I have a really simple Angular app that I\'ve distilled to the following:

var napp = angular.module(\'Napp\',[\'ngResource\']);

var CompanyCtrl = function($scop         


        
7条回答
  •  逝去的感伤
    2021-02-19 04:29

    This may happen (not in the OP's case) if you're using ui-router instead of ngRoute.

    If that's the case, use $stateParams instead of $routeParams.

    https://stackoverflow.com/a/26946824/995229

提交回复
热议问题