http://www.bennadel.com/blog/2935-enable-animations-explicitly-for-a-performance-boost-in-angularjs.htm?utm_campaign=NG-Newsletter&utm_medium=email&utm_source=NG-Newsletter_119

angular.module( "Demo" ).config(
function configureAnimate( $animateProvider ) {
// By default, the $animate service will check for animation styling
// on every structural change. This requires a lot of animateFrame-based
// DOM-inspection. However, we can tell $animate to only check for
// animations on elements that have a specific class name RegExp pattern
// present. In this case, we are requiring the "animated" class.
// --
// NOTE: I have personally seen a performance boost using this approach
// on some complex page. The AngularJS documentation also says that
// this can also be really beneficial for low-powered mobile devices,
// but I don't do much mobile.
$animateProvider.classNameFilter( /\banimated\b/ );
}
);
<li ng-repeat="item in activeList" class="animated">
{{ item }}
</li>

[AngularJS] Enable Animations Explicitly For A Performance Boost In AngularJS的更多相关文章

  1. [AngularJS] New in Angular 1.3 - Performance Boost with debugInfoEnabled

    By default, Angular provides a lot of debug information on the DOM that's only necessary for tools l ...

  2. [AngularJS] Transforming raw JSON data to meaningful output in AngularJS

    angular.module('APP', []) .controller('MainController', function($scope, UserConstants){ var user = ...

  3. [AngularJS] “路由”的定义概念、使用详解——AngularJS学习资料教程

    这是小编的一些学习资料,理论上只是为了自己以后学习需要的,但是还是需要认真对待的 以下内容仅供参考,请慎重使用学习 AngularJS“路由”的定义概念 AngularJS最近真的很火,很多同事啊同学 ...

  4. 用angularjs开发下一代web应用(二):angularjs应用骨架(二)

    1.浅谈非入侵式JavaScript <div ng-click="doSomething()">...</div>这些指令和原来的事件处理器有下面不同之处 ...

  5. AngularJS–Animations(动画)

    点击查看AngularJS系列目录 转载请注明出处:http://www.cnblogs.com/leosx/   在AngularJS 1.3 中,给一些指令(eg:   ngRepeat,ngSw ...

  6. Angularjs 源码

    /** * @license AngularJS v1.3.0-beta.15 * (c) 2010-2014 Google, Inc. http://angularjs.org function t ...

  7. [转] KVM storage performance and cache settings on Red Hat Enterprise Linux 6.2

    Almost one year ago, I checked how different cache settings affected KVM storage subsystem performan ...

  8. 使用Boost.Python构建混合系统(译)

    目录 Building Hybrid Systems with Boost.Python 摘要(Abstract) 介绍(Introduction) 设计目标 (Boost.Python Design ...

  9. PostgreSQL Hardware Performance Tuning

    Bruce Momjian POSTGRESQL is an object-relational database developed on the Internet by a group of de ...

随机推荐

  1. yum安装ftp服务器

    1.安装vsftp,本文采用yum安装: #yum install vsftpd 2.安装后运行: # service vsftpd restart Shutting downvsftpd:      ...

  2. Unity3D动态加载外部资源

    最近一直在和这些内容纠缠,把心得和大家共享一下: Unity里有两种动态加载机制:一是Resources.Load,一是通过AssetBundle,其实两者本质上我理解没有什么区别.Resources ...

  3. js 判断时间,满足执行框架

    // 8点到早上19点关var curr = new Date();var time = curr.getHours(); if ( time >=0 && time <2 ...

  4. Dedecms自定义sql 出现错误Safe Alert: Request Error step 2!

    Dedecms自定义执行sql: SELECT body FROM dede_addonarticle WHERE aid = (select max(aid) fromdede_addonartic ...

  5. Javascript跳转手机站代码

    $(document).ready(function(){ var mobileAgent = new Array("iphone", "ipod", &quo ...

  6. TatukGIS - GisDefs - CheckFileWriteAccess 函数

    函数名称  CheckFileWriteAccess 所在单元  GisDefs 函数原型           1  function CheckFileWriteAccess(const _file ...

  7. linux下svn客户端报错Cannot negotiate authentication mechanism的解决方法

    svn客户端报错Cannot negotiate authentication mechanism的解决方法: 问题出现的原因之一: 因为SVN服务器配置了saslauthd服务用来实现与ldap的对 ...

  8. 利用TraceSource写日志

    利用TraceSource写日志 从微软推出第一个版本的.NET Framework的时候,就在“System.Diagnostics”命名空间中提供了Debug和Trace两个类帮助我们完成针对调试 ...

  9. js 实现 aop

    Aop又叫面向切面编程,用过spring的同学肯定对它非常熟悉,而在js中,AOP是一个被严重忽视的技术点,这篇就通过下面这几个小例子,来说说AOP在js中的妙用. 1, 防止window.onloa ...

  10. codeforces C. Xor-tree

    http://codeforces.com/problemset/problem/430/C 题意:在一棵上有n个节点,有n-1条边,在每一个节点上有一个值0或1,然后给你一个目标树,让你选择节点,然 ...