Angular組件間通訊

一.組件的輸入屬性 1.輸入屬性的裝飾器 @Input() 2.實例代碼 生成子組件order ng g component order 在子組件中輸入amount屬性 //order.component.ts export class OrderComponent{ @Input() amount:string } //order.component.html <p>存在{{amoun
相關文章
相關標籤/搜索