/** 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' ; /**
 * Loan accounts template data resolver.
 */ @ Injectable ( ) export class LoansAccountTemplateResolver implements Resolve < Object > { param { ProductsService } productsService constructor ( private loansService ) { } returns { Observable < any > } resolve ( route ) { const clientId = route . parent . parent . paramMap . get ( 'clientId' ) ; return this . loansService . getLoansAccountTemplateResource ( clientId ) ; } }