Feature: Added the customer module to list / edit customers. This is needed to add the customer discount functionality
This commit is contained in:
18
bookie/src/app/customers/customer-list-resolver.service.ts
Normal file
18
bookie/src/app/customers/customer-list-resolver.service.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve } from '@angular/router';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
|
||||
import { Customer } from '../core/customer';
|
||||
|
||||
import { CustomerService } from './customer.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class CustomerListResolver implements Resolve<Customer[]> {
|
||||
constructor(private ser: CustomerService) {}
|
||||
|
||||
resolve(): Observable<Customer[]> {
|
||||
return this.ser.list();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user