MattDionis MattDionis - 2 months ago 56
AngularJS Question

Set commentDirectivesEnabled and cssClassDirectivesEnabled to false in Angular

I'm attempting to make some small tweaks to my config to hopefully improve performance slightly. I read through the Angular docs here and they mention disabling comment and CSS class directives. I tried to do so with the below code in my config, but I keep getting

TypeError: $compileProvider.commentDirectivesEnabled is not a function
TypeError: $compileProvider.cssClassDirectivesEnabled is not a function

Note: I'm running Angular 1.4.9

'use strict';


compilationConfig.$inject = ['$compileProvider'];

function compilationConfig($compileProvider) {


Solved this myself. This functionality was introduced post 1.4.9 so I will need to upgrade to take advantage of it.