父组件
引用子组件
注意采用"()"而不是"[]"
1 | <app-hero-detail (params)="yourmethod($event)"></app-hero-detail> |
子组件
定义接收参数
@out() params:EventEmitter<boolean> = new EventEmitt();
constructor() {
this.params.emit(true);
}
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
1 | $ hexo new "My New Post" |
More info: Writing
1 | $ hexo server |
More info: Server
1 | $ hexo generate |
More info: Generating
1 | $ hexo deploy |
More info: Deployment