Angularjs error Unknown provider

后端 未结 2 1978
死守一世寂寞
死守一世寂寞 2020-12-16 09:49

I\'m trying to display the configured values author and version in angular value service in html page.Version code is displayed fine but not the au

2条回答
  •  萌比男神i
    2020-12-16 10:13

    bmleite has the correct answer about including the module.

    If that is correct in your situation, you should also ensure that you are not redefining the modules in multiple files.

    Remember:

    angular.module('ModuleName', [])   // creates a module.
    
    angular.module('ModuleName')       // gets you a pre-existing module.
    

    So if you are extending a existing module, remember not to overwrite when trying to fetch it.

提交回复
热议问题