Is there any diffrence between selecting store into the constructor and before it?
1) export class SomeClass {
myObservable$ = <Observable<MyObservableType>>this.store.select(fromReducers.getMyObservable);
constructor(
private store: Store<fromReducers.State>
) { }
}
2) export class SomeClass {
myObservable$ = Observable<MyObservableType>;
constructor(
private store: Store<fromReducers.State>
) {
this.myObservable$ = this.store.select(fromReducers.getMyObservable);
}
}
And why in the ngrx/store app-example they use second variant?