/** 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 data and template resolver.
 */ @ Injectable ( ) export class SavingsAccountAndTemplateResolver implements Resolve < Object > { param { SavingsService } SavingsService constructor ( private savingsService ) { } param { ActivatedRouteSnapshot } route returns { Observable < any > } resolve ( route ) { const savingAccountId = route . paramMap . get ( 'savingAccountId' ) ; return this . savingsService . getSavingsAccountAndTemplate ( savingAccountId , true ) ; } }