入门angular4

1. 语法双向绑定

  property attribute
绑定属性 [] bind-
绑定事件 () on-
双向绑定 [()] bindon-

绑定属性:[attr.xxx] [class.xxx] [style.xxx]对象

  • property是DOM中的属性,是JavaScript里的对象;
  • attribute是HTML标签上的特性,它的值只可以是字符串

 

2. 规范事件

  类 -大驼峰命名法ip

相关文章
相关标签/搜索