Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

166
Vistas
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 Respuestas
Responde la pregunta

0

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

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda