I'm new to Angular and I'm following a tutorial to get started and I'm getting this error in line 11, even if '(' is present
Error: src/app/components/button/button.component.ts:11:27 - error TS1005: '(' expected.
this is the code of button.component.ts
import { Component, OnInit, Input, Output, EventEmitter} from '@angular/core';
@Component({
selector: 'app-button',
templateUrl: './button.component.html',
styleUrls: ['./button.component.css']
})
export class ButtonComponent implements OnInit {
@Input() color: string;
@Input() text: string;
@Output() btnEvetn: new EventEmitter(); //line 11
constructor() { }
ngOnInit(): void {}
onClick()
{
console.log("Added");
}
}
also, I'm getting those other errors, all of them on line 11
Error: src/app/components/button/button.component.ts:11:27 - error TS2314: Generic type 'EventEmitter' requires 1 type argument(s).
Error: src/app/components/button/button.component.ts:11:39 - error TS1441: Cannot start a function call in a type annotation.
Error: src/app/components/button/button.component.ts:11:40 - error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
@Output() btnEvetn: EventEmitter<void> = new EventEmitter();