📌  相关文章
📜  角度将数据传递给子组件 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:18.182000             🧑  作者: Mango

代码示例1
Parent component:


Child component.ts
import { Component, Input } from '@angular/core'; // First, import Input
export class ItemDetailComponent {
  @Input() item = ''; // decorate the property with @Input()
}