diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-12-09 18:20:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-09 18:20:43 -0500 |
commit | 0f8d2ab5d57334320f8c60b626c5af455eddae4f (patch) | |
tree | b9f18e073a9a0b327b9a3b383e6433bc0dbce18a /recipeBuddy/src/app/recipePass | |
parent | c37cbf8fbdb48ce8fc14a76ded2ff5401d7bae4d (diff) | |
parent | 161b1a1b2c3023da26388719cf962039742de350 (diff) |
Merge pull request #19 from tuckerevans/elim
Elim
Diffstat (limited to 'recipeBuddy/src/app/recipePass')
-rw-r--r-- | recipeBuddy/src/app/recipePass/recipe-pass.service.spec.ts | 12 | ||||
-rw-r--r-- | recipeBuddy/src/app/recipePass/recipe-pass.service.ts | 20 |
2 files changed, 32 insertions, 0 deletions
diff --git a/recipeBuddy/src/app/recipePass/recipe-pass.service.spec.ts b/recipeBuddy/src/app/recipePass/recipe-pass.service.spec.ts new file mode 100644 index 0000000..f3a8388 --- /dev/null +++ b/recipeBuddy/src/app/recipePass/recipe-pass.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { RecipePassService } from './recipe-pass.service'; + +describe('RecipePassService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: RecipePassService = TestBed.get(RecipePassService); + expect(service).toBeTruthy(); + }); +}); diff --git a/recipeBuddy/src/app/recipePass/recipe-pass.service.ts b/recipeBuddy/src/app/recipePass/recipe-pass.service.ts new file mode 100644 index 0000000..e925973 --- /dev/null +++ b/recipeBuddy/src/app/recipePass/recipe-pass.service.ts @@ -0,0 +1,20 @@ +import { Injectable } from '@angular/core'; +import { Recipe } from '../DataModels/recipe'; + +@Injectable({ + providedIn: 'root', +}) +export class RecipePassService { + + private sourceRecipe: Recipe; + + constructor() { } + + public setRecipe (recipeToPass: Recipe) { + this.sourceRecipe = recipeToPass; + } + + public getRecipe (): Recipe { + return this.sourceRecipe; + } +} |