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 template data resolver. | |
*/ | |
() | |
export class AccountingRulesTemplateResolver implements Resolve<Object> { | |
/** | |
* @param {AccountingService} accountingService Accounting service. | |
*/ | |
constructor(private accountingService: AccountingService) {} | |
/** | |
* Returns the accounting rules template data. | |
* @returns {Observable<any>} | |
*/ | |
resolve(): Observable<any> { | |
// Calls the getAccountingRulesTemplate method of the AccountingService to fetch the accounting rules template data. | |
return this.accountingService.getAccountingRulesTemplate(); | |
} | |
} |