summaryrefslogtreecommitdiff
path: root/recipeBuddy/src/app/recipePass
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-12-09 18:20:43 -0500
committerGitHub <noreply@github.com>2019-12-09 18:20:43 -0500
commit0f8d2ab5d57334320f8c60b626c5af455eddae4f (patch)
treeb9f18e073a9a0b327b9a3b383e6433bc0dbce18a /recipeBuddy/src/app/recipePass
parentc37cbf8fbdb48ce8fc14a76ded2ff5401d7bae4d (diff)
parent161b1a1b2c3023da26388719cf962039742de350 (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.ts12
-rw-r--r--recipeBuddy/src/app/recipePass/recipe-pass.service.ts20
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;
+ }
+}