I am trying to select my data from ngrx store to pass it to ngx-bootstrap typeahead. My selector from the store is working but i don`t know how i can connect it to the typeahead from ngx.
My code is the following:
constructor(private store: Store) {
this.dataSource = new Observable((observer: Subscriber<string>) => {
observer.next(this.tourNr);
}).pipe(
mergeMap((tourNumber: string) => {
return this.store.select(getTourByTourNr, { tourNr: tourNumber});
})
);
}
I think i am missing a key concept here. What i want to achieve is that the select from the store returns me my actual data but it actually returns the following:
StoreĀ {_isScalar: false, actionsObserver: ActionsSubject, reducerManager: ReducerManager, source: Store, operator: DistinctUntilChangedOperator}
So i don`t know how to return the actual data from the store to return it. Maybe someone can push me in the right direction.