summaryrefslogtreecommitdiff
path: root/recipeBuddy/src/app/pre-cook-pop-up
diff options
context:
space:
mode:
Diffstat (limited to 'recipeBuddy/src/app/pre-cook-pop-up')
-rw-r--r--recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.css0
-rw-r--r--recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.html13
-rw-r--r--recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.spec.ts25
-rw-r--r--recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.ts24
4 files changed, 62 insertions, 0 deletions
diff --git a/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.css b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.css
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.css
diff --git a/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.html b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.html
new file mode 100644
index 0000000..dc87efd
--- /dev/null
+++ b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.html
@@ -0,0 +1,13 @@
+<div>
+{{cookedRecipe.name}}
+ <div>
+ Serving Size: {{cookedRecipe.servingSize}}
+ </div>
+ <div> Ingredients:
+ <li *ngFor="let ing of cookedRecipe.ingredients">
+ {{ing.name}}, {{ing.amount}} unit: {{ing.units}}
+
+ </div>
+</div>
+
+<button routerLink="/cook"> Ready </button>
diff --git a/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.spec.ts b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.spec.ts
new file mode 100644
index 0000000..b355855
--- /dev/null
+++ b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PreCookPopUpComponent } from './pre-cook-pop-up.component';
+
+describe('PreCookPopUpComponent', () => {
+ let component: PreCookPopUpComponent;
+ let fixture: ComponentFixture<PreCookPopUpComponent>;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ PreCookPopUpComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(PreCookPopUpComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.ts b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.ts
new file mode 100644
index 0000000..396784d
--- /dev/null
+++ b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.ts
@@ -0,0 +1,24 @@
+import { Component, OnInit } from '@angular/core';
+import { RecipePassService } from '../RecipePass/recipe-pass.service';
+import { Recipe } from '../DataModels/recipe';
+import { BackendService } from '../REST_service/backend.service';
+
+@Component({
+ selector: 'app-pre-cook-pop-up',
+ templateUrl: './pre-cook-pop-up.component.html',
+ styleUrls: ['./pre-cook-pop-up.component.css']
+})
+export class PreCookPopUpComponent implements OnInit {
+
+ cookedRecipe: Recipe;
+
+ constructor(private recipePass: RecipePassService, private backend: BackendService) { }
+
+ ngOnInit() {
+ this.backend.getRecipe(1).subscribe(res =>
+ {
+ this.cookedRecipe = res
+ });
+ //this.recipeToBeCooked = this.recipePass.getRecipe();
+ }
+}