Reputation: 108
I got this typescript code:
_live: Subject<Match[]> = new BehaviorSubject<Match[]>(null);
_pre: Subject<Match[]> = new BehaviorSubject<Match[]>(null);
But I keeps getting this Error:
(SystemJS) Unexpected token <(…).
When those 2 variables are removed everything else works fine. Is there a fix for this or something else that replace Subject?
Upvotes: 1
Views: 730
Reputation: 20017
Try importing Subject like this-
import { Subject } from 'rxjs/Subject';
or import everything from RxJS like this-
import 'rxjs/Rx';
// adds ALL RxJS statics & operators to Observable
See if this helps.
Upvotes: 1