O'Reilly logo

Learning Web Development with Bootstrap and AngularJS by Stephen Radford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ng-annotate

The ng-annotate is an open source project by Olov Lassus designed to remove one of the most frustrating side effects of using AngularJS. You'll remember that when minifying our code, we had to wrap our dependencies in an array so the names didn't get mangled. The project removes this requirement by looking at our code and wrapping it for us. In short, the tool is a pre-minifier and should be used to prepare our code for uglification.

Previously, we used ngMin by Brian Ford to accomplish the same thing. That project has now been deprecated in favor of ng-annotate.

Installing ng-annotate

The ng-annotate tool is an npm package and can be installed via our command line. There are also additional packages that work with our Grunt and gulp ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required