Angularjs inject provider into module factory function by string name for minification

后端 未结 3 631
离开以前
离开以前 2021-02-18 18:27

I have the following code:

appModule = angular.module(\'appModule\', []);

appModule.factory(\'sharedApplication\', function($rootScope, $http) {
  var sharedApp         


        
3条回答
  •  你的背包
    2021-02-18 18:53

    Try

    appModule.factory('sharedApplication', ['$rootScope','$http',function($rootScope, $http) {
    
    }]);
    

    regards

提交回复
热议问题