:: 在 angularJS 中是什么意思 [英] What does :: mean in angularJS

查看:14
本文介绍了:: 在 angularJS 中是什么意思的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过像

<a href={{ ::something}}>some other thing</a>

那个双冒号是干什么用的?如果删除会发生什么?

What is that double colon for? What happens if it is removed?

推荐答案

:: 用于一次性绑定.一旦稳定,即在第一次摘要之后,表达式将停止重新计算.

:: is used for one-time binding. The expression will stop recalculating once they are stable, i.e. after the first digest.

因此,对something 所做的任何更新都将不可见.

So any updates made to something will not be visible.

这篇关于:: 在 angularJS 中是什么意思的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆