When I navigate with angular routerLink, the following code works fine.
However, if I refresh the page, I get undefined
value.
this.sub = this._route.fragment.subscribe((collectionKey: string) => {
this.store.dispatch( new actions.Select(collectionKey));
const col = this.store.select(fromStore.getSelectedCollection);
col.subscribe(collection => this.collection = collection);
console.log(this.collection)
});
Is there anyway out to solve this?