指令分为三类,组件属性指令结构性指令

  • 组件(Component directive):UI组件,继承于Directive
  • 属性指令(Attribute directive):改变组件的样式
  • 结构指令(Structural directive):改变DOM布局

属性指令例如 ngClass  ngStyle

结构性指令   *ngIf    *ngFor   *ngSwitch

 

参考自http://mttcug.cnblogs.com/

相关文章:

  • 2021-06-11
  • 2021-10-05
  • 2022-12-23
  • 2021-06-09
  • 2021-05-31
猜你喜欢
  • 2021-12-12
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案