add-item-page.html 1.2 KB

12345678910111213141516171819202122232425
  1. <div class="add-item-page" ng-controller="AddItemPageController">
  2. <div class="form-wrapper">
  3. <form ng-submit='sendMeal()'>
  4. <label for="meal-name"><h2>Enter the name of the meal:</h2></label>
  5. <input type="text" id="meal-name" ng-model="resObj.mealName">
  6. <h2>Enter ingredients:</h2>
  7. <div class="ingredient-wrapper" ng-repeat="ingredient in resObj.ingredients track by $index">
  8. <input type="text" ng-model="resObj.ingredients[$index]">
  9. <span ng-click="deleteIngredient($index)" class="fa fa-times"></span>
  10. </div>
  11. <button type="button" ng-click="addIngredient()">Add ingredient</button>
  12. <input type="text" placeholder="image url" ng-model="resObj.imageUrl">
  13. <select ng-model="resObj.type">
  14. <option value="" disabled selected>Select meal type</option>
  15. <option value="breakfast">Breakfast</option>
  16. <option value="lunch">Lunch</option>
  17. <option value="dinner">Dinner</option>
  18. <option value="snacks">Snacks</option>
  19. </select>
  20. <input type="text" ng-model="resObj.weight" placeholder="weight">
  21. <input type="text" ng-model="resObj.price" placeholder="price">
  22. <button type="submit">Send</button>
  23. </form>
  24. </div>
  25. </div>