Methods
(inner) bindPopstate()
Binds the 'popstate' event on the window (which fires when the back &
forward buttons are pressed) so the navigation will continue to work
as expected. (Hint - you should be passing in which page you are on
in your Router when you push your state so you can access that page
info in your popstate function)
- Source:
(inner) bindRecipeCard(recipeCard, pageName)
Binds the click event listener to the elements added to the page
so that when they are clicked, their card expands into the full recipe view mode
Parameters:
| Name | Type | Description |
|---|---|---|
recipeCard |
Element | the |
pageName |
String | the name of the page to navigate to on click |
- Source:
(inner) createPublicRecipeCards()
Generates the elements from the fetched recipes and
appends them to the private recipes page
- Source:
(inner) createRecipeCards()
Generates the elements from the fetched recipes and
appends them to the page
- Source:
(async, inner) fetchPublicRecipes()
Fetches the public recipes from the firebase database as json
objects and stores them into the publicRecipes array
- Source:
(async, inner) fetchRecipes()
Fetches the private recipes from the firebase database as json
objects and stores them into the public_recipes array
- Source: