GitHub

DaffCategoryFacadeInterface

A facade for interacting with the category state. This facade exposes many parts of the state for easy access and allows dispatching of actions.

interface DaffCategoryFacadeInterface<V extends DaffGenericCategory<V> = DaffCategory, W extends DaffProduct = DaffProduct> {
  category$: Observable<V>
  products$: Observable<W[]>
  isCategoryEmpty$: Observable<boolean>
  getCategoryById: Observable<V>
  getProductsByCategory: Observable<W[]>
  getTotalProductsByCategory: Observable<number>
}

Properties

Name Type Description
category$ Observable<V> The currently selected category.
products$ Observable<W[]> Products of the current category.
isCategoryEmpty$ Observable<boolean> Is the category page empty of products.
getCategoryById Observable<V> Get a category by the provided Id.
getProductsByCategory Observable<W[]> Get products by a category Id.
getTotalProductsByCategory Observable<number> Get products by a category Id.