指令分为三类,组件,属性指令和结构性指令
Component directive):UI组件,继承于Directive;Attribute directive):改变组件的样式;Structural directive):改变DOM布局;属性指令例如 ngClass ngStyle
结构性指令 *ngIf *ngFor *ngSwitch
angular5 directive和component的区别
原文:http://www.cnblogs.com/mttcug/p/7976852.html