/** Angular Imports */ import { Injectable } from '@angular/core' ; import { Resolve , ActivatedRouteSnapshot } from '@angular/router' ; /** rxjs Imports */ import { Observable } from 'rxjs' ; /** Custom Services */ import { LoansService } from '../loans.service' ; /**
 * Loans Account Charge data resolver.
 */ @ Injectable ( ) export class LoansAccountChargeResolver implements Resolve < Object > { param { LoansService } LoansService constructor ( private loansService ) { } param { ActivatedRouteSnapshot } route returns { Observable < any > } resolve ( route ) { const loanAccountId = route . parent . parent . paramMap . get ( 'loanId' ) ; const chargeId = route . paramMap . get ( 'id' ) ; return this . loansService . getLoansAccountCharge ( loanAccountId , chargeId ) ; } }