By default, Angular provides a lot of debug information on the DOM that's only necessary for tools like Protractor and Batarang. Angular 1.3 allows you to turn off the debug information to give your app a simple performance boost.

See: https://docs.angularjs.org/api/ng/provider/$compileProvider

More: https://docs.angularjs.org/guide/production#disabling-debug-data

<!DOCTYPE html>
<html ng-app="app">
<head>
<title></title>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.3/angular.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.11/angular-ui-router.js"></script>
<script src="app.js"></script>
</head>
<body>
<script type="text/ng-template" id="templates/home.html">
<note message="Hello"></note>
</script> <ui-view></ui-view> </body>
</html>
angular.module("app", ["ui.router"])

    .config(function config($stateProvider, $compileProvider) {
$stateProvider.state("home", {
url: "",
templateUrl: "templates/home.html"
}) $compileProvider.debugInfoEnabled(false);
}) .directive("note", function note() {
return {
template: "<div>{{ note.message }} {{ note.person }}</div>",
controller: "NoteController as note",
bindToController: true,
scope: {
message: "@"
}
}
}) .controller("NoteController", function NoteController() {
var note = this; note.person = "John";
})

Without debug info:

If you want open the debug info again:

in console:

angular.reloadWithDebugInfo();

[AngularJS] New in Angular 1.3 - Performance Boost with debugInfoEnabled的更多相关文章

  1. [AngularJS] Enable Animations Explicitly For A Performance Boost In AngularJS

    http://www.bennadel.com/blog/2935-enable-animations-explicitly-for-a-performance-boost-in-angularjs. ...

  2. [Angular] Use Angular components in AngularJS applications with Angular Elements

    When migrating AngularJS (v1.x) applications to Angular you have different options. Using Angular El ...

  3. 【js类库AngularJs】解决angular+springmvc的post提交问题

    [js类库AngularJs]解决angular+springmvc的post提交问题 AngularJS诞生于2009年,由Misko Hevery 等人创建,后为Google所收购.是一款优秀的前 ...

  4. [AngularJS] Lazy loading Angular modules with ocLazyLoad

    With the ocLazyLoad you can load AngularJS modules on demand. This is very handy for runtime loading ...

  5. [AngularJS] New in Angular 1.5 ng-animate-swap

    <!DOCTYPE html> <html ng-app="MyApplication"> <head> <link rel=" ...

  6. AngularJS进阶(五)Angular实现下拉菜单多选

    Angular实现下拉菜单多选 写这篇文章时,引用文章地址如下: http://ngmodules.org/modules/angularjs-dropdown-multiselect http:// ...

  7. AngularJS进阶(四)ANGULAR.JS实现下拉菜单单选

    ANGULAR.JS: NG-SELECT AND NG-OPTIONS PS:其实看英文文档比看中文文档更容易理解,前提是你的英语基础还可以.英文文档对于知识点讲述简明扼要,通俗易懂,而有些中文文档 ...

  8. [AngularJS] Using the Angular scope $destroy event and method

    With Angular scopes, you have access to a $destroy event that can be used to watch $scope events. Th ...

  9. [AngularJS] New in Angular 1.3 - bindToController

    If you want to use controllers, instead of a link function, you can use bindToController. <!DOCTY ...

随机推荐

  1. E asy Boo t 6.51 启动易 制作启动光盘的软件(附注册码)

    内建ISO文件生成器,可直接生成可启动ISO文件,并支持N合1优化. -------中文版注册码------- 用户名:中华人民共和国 注册码:2898-5448-5603-BB2D -------英 ...

  2. UINavigationController 操作记录

    //设置字体大小 颜色 { UIColor *color = [UIColor brownColor]; UIFont * font = [UIFont systemFontOfSize:20]; N ...

  3. UITextView 相关知识点

    1.得到UITextView的高度 - (CGRect)contentSizeRectForTextView:(UITextView *)textView { [textView.layoutMana ...

  4. sql基本语句

    ---恢复内容开始--- 查询有几个不同的职位名称: select distinct name from a: group by: 现在有两个表product和sales,字段分别如下: TABLES ...

  5. 仿酷狗音乐播放器开发日志二十四 选项设置窗体的实现(附328行xml布局源码)

    转载请说明原出处,谢谢~~ 花了两天时间把仿酷狗的选项设置窗体做出来了,当然了只是做了外观.现在开学了,写代码的时间减少,所以整个仿酷狗的工程开发速度减慢了.今天把仿酷狗的选项设置窗体的布局代码分享出 ...

  6. c++与java的优缺点

      大多数程序员都认为C/C++会比Java语言快,甚至于觉得从Java语言诞生以来,"执行速度缓慢"的帽子就应当被扣在头顶,这种观点的出现是由于Java刚出现的时候JIT编译技术 ...

  7. .net高级技术(class0515)

    本次课程中讲的有的东西都是根据初学者的认知规律进行了调整,并不是严谨的,比如很多地方在多AppDomain条件下很多说法就不对了,但是说严谨了大家就晕了,因此继续不严谨的讲吧. 很多面试题都在这阶段的 ...

  8. Tkinter教程之Message篇

    本文转载自:http://blog.csdn.net/jcodeer/article/details/1811326 '''Tkinter教程之Message篇'''#Message也是用来显示文本的 ...

  9. LNMP最新源码安装脚本(定期更新)

    Linux+Nginx+MySQL+PHP+Pureftpd+User manager for PureFTPd,脚本中用到的软件包大多最新版本,修复了User manager for PureFTP ...

  10. Apache Spark Streaming的适用场景

    使用场景: Spark Streaming 适合需要历史数据和实时数据结合进行分析的应用场景,对于实时性要求不是特别高的场景也能够胜任.