I have an angularjs application, and I want to be able to get the list of all instantiated controllers in a given moment in Developer Tools console.
我有一个angularjs应用程序,我希望能够在Developer Tools console中的给定时刻获得所有实例化控制器的列表。
How can I do that?
我怎么做呢?
I can't find either of these:
我找不到这两个
angular.controllers
angular.module('app').controllers
Non of these lines exist
这些线都不存在
1 个解决方案
#1
2
i think you can accomplish this by using _invokeQueue
我认为您可以通过使用_invokeQueue来实现这一点
angular.module('app')['_invokeQueue'].forEach(function(val) {
console.log(val[2][0])
})
#1
2
i think you can accomplish this by using _invokeQueue
我认为您可以通过使用_invokeQueue来实现这一点
angular.module('app')['_invokeQueue'].forEach(function(val) {
console.log(val[2][0])
})