I'm trying to emit a event from child to parent component.
Parent:
parent.ts
onChangeUpload(event){
console.log('event');
console.log(event);
}
<app-upload (uploadEmit)="onChangeUpload($event)"></app-upload>
Child:
@Output() uploadEmit: EventEmitter = new EventEmitter();
this.uploadEmit.emit('upload successful');
And i got this error:
core.js:1448 ERROR Error: Uncaught (in promise): TypeError: instance[output.propName].subscribe is not a function
@angular/cli: 1.7.3
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.6.2
webpack: 3.11.0