Angular.module minification bug

前端 未结 8 922
情深已故
情深已故 2020-11-28 03:50

Having the darnedest time trying to figure out why minification is not working.

I have injected via an array object my providers prior the function per numerous sugg

8条回答
  •  盖世英雄少女心
    2020-11-28 04:01

    I got same error. However, for me, the problem is directives' controller declaration. You should do this instead.

    myModule.directive('directiveName', function factory(injectables) {
        var directiveDefinitionObject = {
          templateUrl: 'directive.html',
          replace: false,
          restrict: 'A',
          controller: ["$scope", "$element", "$attrs", "$transclude", "otherInjectables",
            function($scope, $element, $attrs, $transclude, otherInjectables) { ... }]
        };
        return directiveDefinitionObject;
      });
    

    https://github.com/angular/angular.js/pull/3125

提交回复
热议问题