Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法将 $q 注入提供者,在我的情况下,角度抛出异常告诉没有这样的提供者。
对于提供者,这些值被注入到 $get 函数中。
myApp.provider('testProvider', function() { this.$get = function($q) { }; });
更多细节在这里:
AngularJS:服务vs提供者vs工厂
https://gist.github.com/Mithrandir0x/3639232