feat(accounting-rules): view rule component

Add view rule component.
This commit is contained in:
Abhay Chawla
2018-08-06 00:57:30 +05:30
parent 0a092f1ed6
commit 6b008b968d
9 changed files with 211 additions and 4 deletions
@@ -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);
}
}