Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ApiService

whatitdoes

Reponsible for returning data from an API.

consumers

HomeComponent, RecipeComponent, RecipeAdComponent

providerscope

AppComponent

--------------------------------------------------------

Features:

  • Currently uses Firebase
  • Consumers don't need to know which API is used to get the data.
  • Could easily switch to use another API in the future without changing any of the API consumers.

Hierarchy

  • ApiService

Index

Constructors

constructor

Properties

about

about: Observable<object>

Observable of about data.

Private fbCache

Firebase cache service used to connect to Firebase and cache for offline use

filterOptions

Observable of filter options. Used to set up the FilterComponent

latest

Observable of the latest recipe published.

recipes

recipes: Observable<Recipe[]>

Observable of a list of recipes.

Methods

onInit

  • onInit(): void
  • Called when creating the service.

    • Gets the required items from Firebase to use in the app

    Returns void

slugToRecipe

Generated using TypeDoc