Angular, Programming

Angular:Type ‘EventEmitter’ is not generic.

Angular:Type ‘EventEmitter’ is not generic.

I experienced this error while sending data from a child component to parent component angular

Initial Usage in the Child component

 @Output() formEmit:EventEmitter<any> =new EventEmitter();

Import I did for the EventEmitter,

import { EventEmitter } from 'events';

How to Resolve Error

Delete the above EventEmitter import to correctly

import { EventEmitter} from '@angular/core';

You might also like

Leave a Reply

Your email address will not be published. Required fields are marked *