Fork me on GitHub
This API is deprecated since version 1.3.0 and no longer available since version 1.3.1

.ng.js and .ng.html files


Since version 1.2.0 and above, the default behaviour with is using Angular compilation for regular html and js files.

You just need to meteor remove blaze-html-templates ecmascript

So ng-annotate and angular-babel is activated by default for all js files and $templateCache by default for all html files.

If you want to keep using Blaze with Angular you should use the angular-with-blaze package instead of the angular package, don't remove blaze-html-templates and keep reading this file about .ng.js and ng.html


ng-annotate and .ng.js

If you want to avoid minification problems with Angular's dependency annotations, you normally need to use a syntax that you're probably already familiar with:

angular.module('socially').controller('PartiesListCtrl', ['$scope',
  function($scope){
    // ...
}]);

There is a very popular Angular tool called ng-annotate that automatically adds and removes AngularJS dependency injection annotations. Angular-meteor uses that process automatically. All you need to do is to change your .js files to end with .ng.js. Those files will be recognised by Angular-meteor and automatically corrected, so you can simply write your dependency injection like this:

angular.module('socially').controller('PartiesListCtrl',
  function($scope){
    // ...
});

AngularJS templates: .ng.html

Both Blaze (Meteor's templating system) and AngularJS use the same braces or 'double curley brackets' syntax for expressions. That causes issues when you're working with AngularJS in Meteor: Blaze will compile and override your AngularJS expression. To disable that behaviour, you can use the .ng.html file extension.