angular.js - What services should be obtained using angular.injector in angular JS? Is it the service in the official documentation?
PHPz
PHPz 2017-05-15 17:04:45
0
2
710

Inputting angular.injector().get('$scope') directly in the chrome console always reports an error, saying that the provider is unknown. Please let me know if injector() needs to pass parameters? For example, a self-defined module? Or what are the specific services of get?

PHPz
PHPz

学习是最好的投资!

reply all(2)
PHPzhong

Official website documentation

过去多啦不再A梦

You can do this in the chrome console:

angular.element(document.body).injector().get('serviceName')
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template