Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

162
Views
Error: src/app/components/button/button.component.ts:11:27 - error TS1005: '(' expected

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.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

@Output() btnEvetn: EventEmitter<void> = new EventEmitter();

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!