Files
cbsnexora/src/app/accounting/common-resolvers/offices.resolver.ts
T
Abhay ChawlaandGitHub 6e552d72eb refractor: accounting module (#300)
* Refractor components.
* Add resolvers.
* Add relative router links.
* Replace mat-icons by font-awesome icons.
* Add comments.

Fixes: #298
2018-08-19 22:49:48 +05:30

31 lines
664 B
TypeScript

/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve } from '@angular/router';
/** rxjs Imports */
import { Observable } from 'rxjs';
/** Custom Services */
import { AccountingService } from '../accounting.service';
/**
* Offices data resolver.
*/
@Injectable()
export class OfficesResolver implements Resolve<Object> {
/**
* @param {AccountingService} accountingService Accounting service.
*/
constructor(private accountingService: AccountingService) {}
/**
* Returns the offices data.
* @returns {Observable<any>}
*/
resolve(): Observable<any> {
return this.accountingService.getOffices();
}
}