angular2 系列教程(二)組件

一. 組件 創建組件: ng g c login -it -is (完整寫法: ng generate component login --inline-template --inline-style)  其中「-it -is」代表生成組件的時候將HTML和CSS樣式放在同一個文件中 引用組件:在根組件的模版「app.component.html」中加入我們的組件引用 <app-login></a
相關文章
相關標籤/搜索