Files
brewman/overlord/src/app/role/role-resolver.service.ts
T
tanshu 22cac61761 Feature: Adding recipe templates to print recipes.
Feautre: Recipe export to xlsx
Chore: Python 11 style type annotations
Chore: Moved to sqlalchemy 2.0
Chore: Minimum python is 3.11
Fix: Fix nullability of a lot of fields in the database.
2023-07-23 08:12:21 +05:30

19 lines
484 B
TypeScript

import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot } from '@angular/router';
import { Observable } from 'rxjs/internal/Observable';
import { Role } from './role';
import { RoleService } from './role.service';
@Injectable({
providedIn: 'root',
})
export class RoleResolver {
constructor(private ser: RoleService) {}
resolve(route: ActivatedRouteSnapshot): Observable<Role> {
const id = route.paramMap.get('id');
return this.ser.get(id);
}
}