您的位置:首页 > 其它

Salesforce Lightning {!expression}和{#expression}的区别

2017-11-20 11:26 274 查看
{#expression} (Unbound Expressions)

Data updates behave as you would expect in JavaScript. Primitives, such as String , are passed by value, and data updates for the

expression in the parent and child are decoupled.

Objects, such as Array or Map , are passed by reference, so changes to the data in the child propagate to the parent. However,

change handlers in the parent aren’t notified. The same behavior applies for changes in the parent propagating to the child.

{!expression} (Bound Expressions)

Data updates in either component are reflected through bidirectional data binding in both components. Similarly, change handlers

are triggered in both the parent and child components.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: