feat(accounting-rules): view rule component
Add view rule component.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { AccountingService } from '../../accounting.service';
|
||||
|
||||
@Injectable()
|
||||
export class ViewAccountingRuleResolver implements Resolve<Object> {
|
||||
|
||||
constructor(private accountingService: AccountingService) {}
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||
const id = route.paramMap.get('id');
|
||||
|
||||
return this.accountingService.getAccountingRule(id);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user