【发布时间】:2017-09-22 14:15:08
【问题描述】:
根据AngularJS Developer Guide - Directives "Isolating the Scope of a Directive",作用域绑定可以分为3种类型
=、@ 和 &
和
根据"Directive Definition Object" section in this Page,作用域绑定可以分为4种类型
=、@、& 和 <
即使在大多数在线文章中,孤立的范围绑定也只给出了 3 种类型。
哪个是正确的?
【问题讨论】:
-
单向
<绑定是在 AngularJS V1.5 中添加的。见AngularJS commit feat($compile): add one-way binding to the isolate scope definition -
您引用的开发人员指南部分已过时。有关隔离范围的最新指南,请参阅AngularJS Developer Guide - Component Based Application Architecture
标签: angularjs angularjs-scope angular-directive angular-components isolate-scope