Spaces:
Runtime error
Runtime error
/** 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'; | |
/** | |
* Accounting rules data resolver. | |
*/ | |
() | |
export class AccountingRulesResolver implements Resolve<Object> { | |
/** | |
* @param {AccountingService} accountingService Accounting service. | |
*/ | |
constructor(private accountingService: AccountingService) {} | |
/** | |
* Returns the accounting rules data. | |
* @returns {Observable<any>} | |
*/ | |
resolve(): Observable<any> { | |
// Call the getAccountingRules method of the AccountingService to retrieve the accounting rules data. | |
return this.accountingService.getAccountingRules(); | |
} | |
} |