AngularJS with .NET MVC Join Error

I am developing a large AngularJS application inside the .NET MVC website. I have come a long way without testing, if it will be restrained minifiy, using the optimization functions of the Bundle?

BundleTable.EnableOptimizations = True

And of course, it fails. I played with Order, I bundle my scripts and guaranteed that I use String Literals for my controller names (I wasn’t, and this is a lot of re-factoring that I will need to do).

But I can not get my Core Scripts in Minifiy without the angular "Unknown provider" error.

Here is the exact error: Uncaught Error: [$ injector: modulerr] [ http://errors.angularjs.org/1.3.14/ $ injector / modulator? P0 = ppAccount & pp1 = error ... redScripts% 3Fv% 3DknV3wkCOg32ajaw4GwiRSrTXdo8Ue7MRIn65CPYa1b81% 3A1% 3A379851)] 1

Here is my failed package configuration:

            bundles.Add(new ScriptBundle("~/bundles/PilotPartnerRequiredScripts")
      .Include(
          "~/UI/js/jquery/jquery-2.1.3.js",
          "~/UI/js/plugins/jquery-ui/jquery-ui.js",
          "~/UI/js/bootstrap/bootstrap.js",
          "~/UI/js/plugins/pace/pace.min.js",
          "~/UI/js/plugins/slimscroll/jquery.slimscroll.js",
          "~/UI/js/inspinia.js",
          "~/UI/js/angular/angular.js",
          "~/UI/js/ui-router/angular-ui-router.js",
          "~/UI/js/bootstrap/ui-bootstrap-tpls-0.12.1.js",
          "~/UI/js/angular/angular-resource.js",
          "~/UI/js/angular/angular-sanitize.js",
          "~/UI/js/angular/angular-route.js",
          "~/UI/js/plugins/switchery/switchery.js",
           "~/UI/js/plugins/angular-ui-switch/angular-ui-switch.js",
           "~/UI/js/plugins/angularLocalStorage/angular-local-storage.js",
           "~/UI/js/plugins/ngDialog/ngDialog.js",
           "~/Scripts/ngTags/ng-tags-input.js",
           "~/Scripts/uiSortable/sortable.js",
           "~/Scripts/kendo/2014.3.1119/kendo.all.min.js",
           "~/Scripts/xeditable/xeditable.js"

In my life I can’t understand what kind of addiction is not solved. I feel that if I can narrow it down to a certain addiction, I know that I can solve the problem.

Is there a way to track the specific module that is causing the problem?

Any suggestions on how to make this work?

Thank you for your help.

+4
source share
1 answer

di ( Array)

Angualar Doc , Do DI, minification,

Eg. ()

angular.module('myModule', [])
.factory('serviceId', ['depService', function(depService) {
  // ...
}])
.directive('directiveName', ['depService', function(depService) {
  // ...
}])
.filter('filterName', ['depService', function(depService) {
  // ...
}]);

DI, angular, . , , .

+6

All Articles