事实事件有两种定义方式 @Output 声明事件 angular 通常方式,使用 @Output() 方式 // 在组件声明一个事件 @Output() public tapped = new EventEmitter(); // 组件中触发事件 this.tapped.emit(); 调用组件 <app-custom (tapped)="onTapped()"> public onT…
事实事件有两种定义方式 @Output 声明事件 angular 通常方式,使用 @Output() 方式 // 在组件声明一个事件 @Output() public tapped = new EventEmitter(); // 组件中触发事件 this.tapped.emit(); 调用组件 <app-custom (tapped)="onTapped()"> public onT…
讨论
登录后参与讨论
还没有评论,来说第一句吧。