首页 > 其他 > 详细

angular5 directive和component的区别

时间:2017-12-04 14:32:48      阅读:371      评论:0      收藏:0      [点我收藏+]

 

 

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

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

属性指令例如 ngClass  ngStyle

结构性指令   *ngIf    *ngFor   *ngSwitch

 

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

angular5 directive和component的区别

原文:http://www.cnblogs.com/mttcug/p/7976852.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!