好好爱自己!

angularJS 系列(七)

In AngularJS 1.3+, there is One-time binding built-in:

The main purpose of one-time binding expression is to provide a way to create a binding that gets deregistered and frees up resources once the binding is stabilized. Reducing the number of expressions being watched makes the digest loop faster and allows more information to be displayed at the same time.

In order to make the one-time binding, prepend :: to the binding value:

<div>{{::name}}</div>

Also see relevant discussions:

posted @ 2017-05-18 13:23  立志做一个好的程序员  阅读(213)  评论(0编辑  收藏  举报

不断学习创作,与自己快乐相处