angular 父子传值
父传子
子组件
import { Component, OnInit } from '@angular/core';
import { Input } from '@angular/core';
export class ProductAlertsComponent implements OnInit {
@Input() product;
constructor() { }
ngOnInit() {
}
}
父组件
<button (click)="share()">
原创
2021-01-11 09:34:21 ·
338 阅读 ·
0 评论