Angular: Events and "subscribe is not a function" error
The problem is here:
import { EventEmitter } from "events";
You have to import EventEmitter
from@angular/core
like this:
import { EventEmitter } from "@angular/core";
EventEmitter
should come from '@angular/core'
I see in your code it comes from 'events'
.
Are you sure it is the correct object that you are using?