Angular實現組件多層嵌套
需求:想用Angular實現Card組件,Card組件中要可以嵌入其他組件或者內容。 方法:使用ng-content 代碼: card.component.html 引入card組件的home.component.html ...
需求:想用Angular實現Card組件,Card組件中要可以嵌入其他組件或者內容。 方法:使用ng-content 代碼: card.component.html 引入card組件的home.component.html ...