“Unknown provider: aProvider <- a” How do I find the original provider?

后端 未结 9 658
自闭症患者
自闭症患者 2020-12-07 08:46

When I\'m loading the minified (through UglifyJS) version of my AngularJS application, I get the following error in the console:

Unknown provider: aProvider          


        
9条回答
  •  执笔经年
    2020-12-07 09:45

    With generator-gulp-angular:

       /** @ngInject */
        function SomeController($scope, myCoolService) {
    
    }
    

    Write /** @ngInject */ before each controller, service, directive.

提交回复
热议问题