StefanM StefanM - 22 days ago 13
AngularJS Question

Setting up Angular for production

I have been trying to follow the suggestions for running an angular app in production. However I have been struggling to disable the comment and css class directives:

$compileProvider.commentDirectivesEnabled(false);
$compileProvider.cssClassDirectivesEnabled(false);


When I try to add these commands to the config block I receive the error:

$compileProvider.commentDirectivesEnabled is not a function


The codepen below demonstrates my issue, if you comment out the two lines then the code runs without any problem:

http://codepen.io/anon/pen/RoaKbj?editors=1010

Answer

These two methods don't exist in the 1.5.8 version of angular that you're using.

They exist in the 1.6.0-rc.0 version though.

Comments