Feature: Recipe module mostly working. What needs to be done is duplicating recipes and export for checking.
Feature: Non Contract Purchases Report
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
|
||||
import { Recipe } from './recipe';
|
||||
import { RecipeService } from './recipe.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class RecipeResolver implements Resolve<Recipe> {
|
||||
constructor(private ser: RecipeService) {}
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<Recipe> {
|
||||
const id = route.paramMap.get('id');
|
||||
return this.ser.get(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user