Reputation: 263
I am getting the issue when using Subject in rxjs. It give error when i give type string to Subject
Expected 0 type arguments, but got 1
Upvotes: 0
Views: 62
Reputation: 222532
You should always initialize the subject inside the constructor,
Declare the variable as,
private _sourceSubject: Subject<string>;
and inside the constructor,
this._sourceSubject = new Subject<string>();
Upvotes: 1