一.使用的第一个Angular技术
1.模板数据绑定 根据数据数量重复生成
*ngFor="let XXX of YYY"
① 在.component.ts文件中声明数据类型
eg:如stars
a. private stars: boolean[];
b. ngOnInit()中初始化,对数据初始化
c.在html文件中 对咬重复生成的模块 添加*ngFor="let XXX of YYY"
XXX为生成新数组名,YYY为.ts文件中声明的对象
2.数据绑定
①差值表达式
{ {}} : 直接引用
②属性绑定
eg:product的图片路径
在product.component.ts文件中
private imgUrl = 'http://placehold.it/320x150';
随