Skip to content

Instantly share code, notes, and snippets.

@ZackDeRose
Last active January 16, 2019 04:16
Show Gist options
  • Save ZackDeRose/685c5f8b4d0de33c66e95827401ba514 to your computer and use it in GitHub Desktop.
Save ZackDeRose/685c5f8b4d0de33c66e95827401ba514 to your computer and use it in GitHub Desktop.
cars.facade.ts
export abstract class CarsFacade {
protected _source: string;
loaded$ = this.store.select(carsQuery.getLoaded);
allCars$ = this.store.select(carsQuery.getAllCars);
selectedCars$ = this.store.select(carsQuery.getSelectedCars);
constructor(private store: Store<CarsState>) {}
protected loadAll() {
this.store.dispatch(new LoadCars(this._source));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment