Retrieve Your Recipes
In the previous section we have created a form where our users can create recipes. Here we will show you how you can retrieve all of the recipes and generate a report out of them.
Retrieving All Items
Just as before we have to declare the Recipe entity using the ng-entity attribute. Then we use ng-init attribute to read all of the entities from the Database and store them in recipes variable.
Once we have all of the entities we can iterate over them with ng-repeat attribute. In our case we are replicating the <tr/> or table row element once for each recipe.
Editing an Item
We have already created a template for recipe editing. We will use that template to allow you to view or edit any recipe. Notice, the {{recipe.name}} is enclosed in a <a/> or anchor tag. We simply create an href pointing to /Tutorial:Recipe_Form_Advanced#recipe={{recipe.$id}}. The Angular framework will replace the {{recipe.$id}} with the id of the current recipe. Clicking on the link will cause the destination page opening to the appropriate document automatically.