Files
barker/bookie/src/app/customers/customer.resolver.ts
Amritanshu 010e9a84db Chore: Upgrade to Angular v18
Chore: Upgrade to Python 3.12
Chore: Upgrade to psycopg3
2024-06-03 13:22:56 +05:30

12 lines
337 B
TypeScript

import { inject } from '@angular/core';
import { ResolveFn } from '@angular/router';
import { Customer } from '../core/customer';
import { CustomerService } from './customer.service';
export const customerResolver: ResolveFn<Customer> = (route) => {
const id = route.paramMap.get('id');
return inject(CustomerService).get(id);
};