Increase Your Performance In Production With AngularJS

Posted By Weston Ganger

There are two things you should do with your AngularJS 1.x app before deploying to production to increase your performance.

First we need to disable debugging data.

/* app.js */

yourApp.config(['$compileProvider'], function($compileProvider){
  $compileProvider.debugInfoEnabled(false);
}]);

Secondly we should turn on strict-di mode to get performance increases to dependency injection.

<pre>
<code class="language-markup">
<div ng-app="yourApp" ng-strict-di>
<!-- etc. -->
</div>



Related External Links:

- [AngularJS Docs - Production](https://docs.angularjs.org/guide/production)

Article Topic:Software Development - Javascript

Date:May 10, 2016