Can $q and $http be injected in the .config section

前端 未结 3 634
余生分开走
余生分开走 2020-12-18 20:58

Is it possible to inject $q in the config section of my module? Below is my sample config section.

.config([\'$q\', function ($q) {
    var func = function (         


        
3条回答
  •  庸人自扰
    2020-12-18 21:35

    Correct--you can't inject $http or $q from a config function. They are not available yet (they're also being configured!).

提交回复
热议问题