Angular 4:自訂Directive
我們定義了一個component,如果我們希望透過程式改變component內的背景顏色,過程不免是在component上加入一些binding的方式來動態改變component的style或class。
Angular 4:Directive
這邊記錄幾個Angular 的directive使用方法:
分別為
1. ngIf
分別為
1. ngIf
2. ngIf-else
3. ngStyle
4. ngClass
5. ngFor
訂閱:
文章 (Atom)