Q:

Difference between 'new BehaviorSubject' and 'BehaviorSubject.create'

I am using Angular 2 and RxJS 5.
Is there any difference between these two:
And which should be used first? Thanks
isOpen$ = new BehaviorSubject<boolean>(true);

and
isOpen$ = BehaviorSubject.create(true);

A:

BehaviorSubject doesn't have a create method, so I am guessing that is being exposed by the Subject base class. 
Use the constructor.
You should be using the constructor of the BehaviorSubject in this case. The create method is used to combine an Observer and Observable.
For instance, you could convert a WebSocket into a Subject by doing:
var webSocket = new WebSocket(url);

var observer = Observer.create(next => webSocket.send(JSON.stringify(next)));
var observable = Observable.fromEvent(webSocket, 'message', m => JSON.parse(m.data));

var subject = Subject.create(observer, observable);

