Angularjs在生产中禁用调试数据
我正在尝试禁用生产服务器中的调试数据,正如文档中建议的那样。补充说,我没有看到性能和加载时间有任何改善。下面是我的代码在app.js中的外观。这样做对吗Angularjs在生产中禁用调试数据,angularjs,performance,Angularjs,Performance,我正在尝试禁用生产服务器中的调试数据,正如文档中建议的那样。补充说,我没有看到性能和加载时间有任何改善。下面是我的代码在app.js中的外观。这样做对吗 angular.module('myApp',['toaster','ui.router','ui.bootstrap','myApp.controllers','myApp.directives','myApp.filters','myApp.services']) .config(['$compileProvider', function
angular.module('myApp',['toaster','ui.router','ui.bootstrap','myApp.controllers','myApp.directives','myApp.filters','myApp.services'])
.config(['$compileProvider', function ($compileProvider) {
$compileProvider.debugInfoEnabled(false);
}]);
有没有办法检查调试信息是否被禁用
我看不到性能和加载时间有任何改进
是的,人类无法分辨少数ms/us之间的差异
有没有办法检查调试信息是否被禁用
是,检查是否存在调试信息类
document.querySelectorAll('.ng-scope,.ng-binding,.ng-isolate-scope').length === 0
// true