[SOLVED] Angular in Production

Just wanted to ask this before I create an issue

On https://docs.angularjs.org/guide/production we can disable debug info to improve performance.

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

Is it possible to tie in a check to see whether Meteor is running in --production mode to enable or disable that?

TL;DR

import { Meteor } from 'meteor/meteor'
import myApp from '/imports/myApp'
angular.module(myApp).config($compileProvider => {
  $compileProvider.debugInfoEnabled(!Meteor.isProduction)
})

Blog post about it

http://www.trajano.net/2016/04/minor-performance-boost-for-angularjs-and-meteor/?preview=1&_ppp=303cfd5924

1 Like