19 lines
588 B
TypeScript
19 lines
588 B
TypeScript
|
import {Injectable} from '@angular/core';
|
||
|
import {ActivatedRouteSnapshot, Resolve, RouterStateSnapshot} from '@angular/router';
|
||
|
import {Observable} from 'rxjs/internal/Observable';
|
||
|
import {Account} from '../account/account';
|
||
|
import {AccountService} from '../account/account.service';
|
||
|
|
||
|
@Injectable({
|
||
|
providedIn: 'root'
|
||
|
})
|
||
|
export class ReceiptAccountsResolver implements Resolve<Account[]> {
|
||
|
|
||
|
constructor(private ser: AccountService) {
|
||
|
}
|
||
|
|
||
|
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<Account[]> {
|
||
|
return this.ser.receiptAutocomplete('');
|
||
|
}
|
||
|
}
|