|
|
|
@@ -1,12 +1,29 @@ |
|
|
|
import { Recipe } from "./recipe.model"; |
|
|
|
import { EventEmitter } from "@angular/core"; |
|
|
|
import { Ingredient } from "../shared/ingredient.model"; |
|
|
|
|
|
|
|
export class RecipeService { |
|
|
|
recipeSelected = new EventEmitter<Recipe>(); |
|
|
|
|
|
|
|
private recipes: Recipe[] = [ |
|
|
|
new Recipe('A Test Recipe', 'This is simlpy a test', 'http://maxpixel.freegreatpicture.com/static/photo/1x/Recipe-Soup-Noodle-Curried-Spicy-Chicken-Khaosoi-2344152.jpg'), |
|
|
|
new Recipe('Another Test Recipe', 'This is simlpy a test', 'http://maxpixel.freegreatpicture.com/static/photo/1x/Recipe-Soup-Noodle-Curried-Spicy-Chicken-Khaosoi-2344152.jpg') |
|
|
|
new Recipe( |
|
|
|
'A Test Recipe', |
|
|
|
'This is simlpy a test', |
|
|
|
'http://maxpixel.freegreatpicture.com/static/photo/1x/Recipe-Soup-Noodle-Curried-Spicy-Chicken-Khaosoi-2344152.jpg', |
|
|
|
[ |
|
|
|
new Ingredient('Foo', 1), |
|
|
|
new Ingredient('Bar', 2) |
|
|
|
] |
|
|
|
), |
|
|
|
new Recipe( |
|
|
|
'Another Test Recipe', |
|
|
|
'This is simlpy a test', |
|
|
|
'http://maxpixel.freegreatpicture.com/static/photo/1x/Recipe-Soup-Noodle-Curried-Spicy-Chicken-Khaosoi-2344152.jpg', |
|
|
|
[ |
|
|
|
new Ingredient('Foo', 1), |
|
|
|
new Ingredient('Bar', 2) |
|
|
|
] |
|
|
|
) |
|
|
|
]; |
|
|
|
|
|
|
|
getRecipes() { |
|
|
|
|