No puede seleccionar más de 25 temas
Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
|
- import { EventEmitter } from "@angular/core";
- import { Subject } from "rxjs/Subject";
-
- import { Recipe } from "./recipe.model";
- import { Ingredient } from "../shared/ingredient.model";
-
- export class RecipeService {
- recipesChanged = new Subject<Recipe[]>();
- private recipes: Recipe[] = [];
-
- replaceRecipes(recipes: Recipe[]) {
- this.recipes = recipes;
- this.recipesChanged.next(this.recipes.slice());
- }
-
- getRecipes() {
- return this.recipes.slice();
- }
- }
|