我想了解HTML绑定,因为我是新的角。 能有人请解释下面的语法之间的区别:角2:HTML属性绑定
<!-- 1 -->
<button name1 = "name2" >test</button>
<!-- 2 -->
<button (name1) = "name2" >test</button>
<!-- 3 -->
<button [name1] = "name2" >test</button>
<!-- 4 -->
<button ([name1]) = "name2" >test</button>
我已经在多个地方上面看到的,但无法了解每个案件的目的。
谢谢你的帮助!
https://angular.io /docs/ts/latest/guide/template-syntax.html#!#twoway –
我认为[绑定语法](https://angular.io/docs/ts/latest/guide/template-syntax.html# !#binding-syntax)i就是你正在寻找 –