Disabling Angularjs debugging data in production

I am trying to disable debugging data on a production server as suggested in angular docs here . Adding that I see no improvement in performance and load time. This is what my code looks like in app.js. Is this right to do?

angular.module('myApp',['toaster','ui.router','ui.bootstrap','myApp.controllers','myApp.directives','myApp.filters','myApp.services']) .config(['$compileProvider', function ($compileProvider) { $compileProvider.debugInfoEnabled(false); }]); 

Is there a way to check if debugging information is disabled?

+4
source share
1 answer

I do not see improvements in performance and load time.

Yes, people cannot distinguish several ms / us.

Is there a way to check if debugging information is disabled?

Yes, check for debugging information classes.

 document.querySelectorAll('.ng-scope,.ng-binding,.ng-isolate-scope').length === 0 // true 
+2
source

Source: https://habr.com/ru/post/1246241/


All Articles