tanshu
5ea09df272
Now all that is needed is to make it ready for strict compiling. Removed eslint-plugin-prettier as it is not recommended and causes errors for both eslint and prettier Bumped to v8.0.0
19 lines
591 B
TypeScript
19 lines
591 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
|
|
import { Observable } from 'rxjs/internal/Observable';
|
|
|
|
import { BalanceSheet } from './balance-sheet';
|
|
import { BalanceSheetService } from './balance-sheet.service';
|
|
|
|
@Injectable({
|
|
providedIn: 'root',
|
|
})
|
|
export class BalanceSheetResolver implements Resolve<BalanceSheet> {
|
|
constructor(private ser: BalanceSheetService) {}
|
|
|
|
resolve(route: ActivatedRouteSnapshot): Observable<BalanceSheet> {
|
|
const date = route.paramMap.get('date');
|
|
return this.ser.list(date);
|
|
}
|
|
}
|