import { Component, EventEmitter, Output } from "@angular/core";
@Component({
selector: 'app-nova-transferencia',
templateUrl: './nova-transferencia.component.html',
styleUrls: ['./nova-transferencia.component.scss']
})
export class NovaTransferenciaComponent {
valor: number;
destino: string;
public transferir(): void{
@Output() aoTransferir = new EventEmitter<any>();
console.log('Nova transferencia solicitada...');
console.log(this.valor);
console.log(this.destino);
const enviar = {valor: this.valor, destino: this.destino};
//this.aoTransferir.emit(enviar);
}
}
"@angular/common": "~10.1.5",
Não consegui achar onde esta o erro de jeito nenhum:
Errors while compiling. Reload prevented. errors @ client:150 (anônimo) @ socket.js:47 sock.onmessage @ SockJSClient.js:67 EventTarget.dispatchEvent @ sockjs.js:170 (anônimo) @ sockjs.js:888 SockJS._transportMessage @ sockjs.js:886 EventEmitter.emit @ sockjs.js:86 WebSocketTransport.ws.onmessage @ sockjs.js:2962 wrapFn @ zone-evergreen.js:1218 invokeTask @ zone-evergreen.js:399 runTask @ zone-evergreen.js:167 invokeTask @ zone-evergreen.js:480 invokeTask @ zone-evergreen.js:1621 globalZoneAwareCallback @ zone-evergreen.js:1647 client:159 src/app/nova-transferencia/nova-transferencia.component.ts:15:14 - error TS1146: Declaration expected.
15 @Output() aoTransferir = new EventEmitter();