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.
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.
相关文章推荐
- Salesforce Lightning 使用 SVG
- Salesforce Lightning - 工作中常用的技能总结
- Salesforce Lightning 修改后不立即生效
- Salesforce Lightning 在页面布局中添加相关列表tab
- Salesforce Lightning - 常用标签整合
- Salesforce Lightning 动态初始化选项列表
- Salesforce Lightning 重写lightning的View操作报错
- Salesforce Lightning Winter 18 发布的五个控件
- Salesforce Lightning 中修改"最近列表"要显示的字段
- Salesforce Lightning 使用lightning:dualListbox报错“Can not read property 'xxx' of undefined”
- Salesforce / Salesforce Lightning 移除快速操作
- Salesforce Lightning 组件间的交互
- Salesforce Lightning 在JS controller中调用另一个JS方法
- Salesforce HaoIDE加载org中Lightning组件
- 在Java程序中调用Salesforce REST API
- Salesforce CBU/EBU/SMB 的意义
- Salesforce to Salesforce Config&Code实现
- 使用 Salesforce.com SOAP API 新建用户
- Salesforce soql 悲观锁For Update
- salesforce零基础学习(七十五)浅谈SOSL(Salesforce Object Search Language)