2020-10-01 15:21:22 +00:00
|
|
|
import { Injectable } from '@angular/core';
|
|
|
|
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
|
|
|
import { Observable } from 'rxjs/internal/Observable';
|
|
|
|
import { Account } from '../core/account';
|
|
|
|
import { AccountService } from '../core/account.service';
|
2018-05-25 13:49:00 +00:00
|
|
|
|
|
|
|
@Injectable({
|
2020-10-01 15:21:22 +00:00
|
|
|
providedIn: 'root',
|
2018-05-25 13:49:00 +00:00
|
|
|
})
|
|
|
|
export class ReceiptAccountsResolver implements Resolve<Account[]> {
|
2020-10-01 15:21:22 +00:00
|
|
|
constructor(private ser: AccountService) {}
|
2018-05-25 13:49:00 +00:00
|
|
|
|
|
|
|
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<Account[]> {
|
|
|
|
return this.ser.receiptAutocomplete('');
|
|
|
|
}
|
|
|
|
}
|