@Components({ ...., inputs:['init'], outputs:['finish'] }) export class xxx(){ okEvent: EventEmitter<any> = new EventEmitter(); ok(){ // this should match the type define in EventEmitter this.okEvent.emit('the value want to pass'); } }
// in another components <ddd (finish)="finish($event)" [init]="value pass in"></ddd>