标签:接收 ati highlight 指令 cts 通信 src div htm
1、*ngFor指令
*ngFor="let product of products"
2、属性绑定
[src]="imgUrl"
3、属性绑定
[class.glyphicon-star-empty]="star"
4、组件之间的通信
父组件中传入
[rating]="product.rating"
子组件接收
@Input() //装饰器
private rating:number=0;
标签:接收 ati highlight 指令 cts 通信 src div htm
原文地址:http://www.cnblogs.com/karila/p/7118025.html