diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-12-11 17:56:49 -0500 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-12-11 18:06:57 -0500 |
commit | 9af4ca5c5d8be8bacc512f9d84a58deef6fff835 (patch) | |
tree | 0bb38c7fdf5615a2c6b71063cf3041103aaea0bb /recipeBuddy/src | |
parent | 09aea62746e50d8284dc234692e7641cca03cc42 (diff) |
Fix use passService for recipe to edit
Diffstat (limited to 'recipeBuddy/src')
-rw-r--r-- | recipeBuddy/src/app/edit-recipe/edit-recipe.component.ts | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/recipeBuddy/src/app/edit-recipe/edit-recipe.component.ts b/recipeBuddy/src/app/edit-recipe/edit-recipe.component.ts index 203f733..e7966b3 100644 --- a/recipeBuddy/src/app/edit-recipe/edit-recipe.component.ts +++ b/recipeBuddy/src/app/edit-recipe/edit-recipe.component.ts @@ -13,6 +13,7 @@ import { Recipe } from '../DataModels/recipe'; import { Ingredient } from '../DataModels/ingredient' import { Step } from '../DataModels/step'; import { BackendService } from '../REST_service/backend.service'; +import { RecipePassService } from '../recipePass/recipe-pass.service'; @Component({ selector: 'app-edit-recipe', @@ -21,18 +22,7 @@ import { BackendService } from '../REST_service/backend.service'; }) export class EditRecipeComponent implements OnInit { - baseRecipe: Recipe = new Recipe (15, //id - '', //name - '', //description - [], //ingredients - [], //steps - 0, //servingSize - 0, //cookTime - 0, //timesCooked - 0, //rating - [], //tags - [] //photos - ); + baseRecipe: Recipe = this.passService.getRecipe(); recipeForm = this.fb.group({ recipeName: ['', Validators.required], @@ -59,7 +49,7 @@ export class EditRecipeComponent implements OnInit { constructor(private fb: FormBuilder, private restService: BackendService, private router: Router, - /*private passService: PassService,*/ + private passService: RecipePassService, ) { restService.getRecipe(this.baseRecipe.id).subscribe( |