/** Angular Imports */ import { Injectable } from '@angular/core' ; import { Resolve , ActivatedRouteSnapshot } from '@angular/router' ; /** rxjs Imports */ import { Observable } from 'rxjs' ; /** Custom Services */ import { SavingsService } from '../savings.service' ; /**
 * Savings Account Template resolver.
 */ @ Injectable ( ) export class SavingsAccountTemplateResolver implements Resolve < Object > { param { savingsService } SavingsService constructor ( private savingsService ) { } param { ActivatedRouteSnapshot } route returns { Observable < any > } resolve ( route ) { const entityId = route . paramMap . get ( 'clientId' ) || route . paramMap . get ( 'groupId' ) || route . paramMap . get ( 'centerId' ) ; const isGroup = ( route . paramMap . get ( 'groupId' ) || route . paramMap . get ( 'centerId' ) ) ? true : false ; return this . savingsService . getSavingsAccountTemplate ( entityId , undefined , isGroup ) ; } }