Thursday, 15 May 2014

javascript - How minify an Angular Prj -


This is my problem ...

I create the next small exmaple with gruntFile.js And I can reduce it

This is an error for me:

  Unwanted error: [$ Injector: Named] module 'My app' is not available! You either misspelled the name of the module or forgot to load it. If a module is registering, make sure you specify the dependency in the form of the second argument. Http://errors.angularjs.org/1.3.11/$injector/nomod?p0=myApp  

This is a link to see my example:

<

">

Remove the first thing to start a ng-app =" myApp ", because he declared you twice You must follow the array annotation of dependency injection, to ensure correct mination without error, you have lost it within the directive.

Director

< Pre> angular.module ('MyApp'). Directive (' FireForm Directive ', [function] {return:' AE ', template: Answer:' js / directives / beerform / beerform_view '', radius: {}, controller: 'beerman_controller' / / controller added from the scene};} ]);

and delete ng-controller from your html template. & Amp; cdn

Comparing the javascript file locally to better performance

No comments:

Post a Comment