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