/** Angular Imports */ import { Injectable } from '@angular/core' ; import { Resolve , ActivatedRouteSnapshot } from '@angular/router' ; /** rxjs Imports */ import { Observable } from 'rxjs' ; /** Custom Services */ import { SharesService } from '../shares.service' ; /**
 * Shares Account data and template resolver.
 */ @ Injectable ( ) export class SharesAccountAndTemplateResolver implements Resolve < Object > { param { SharesService } SharesService constructor ( private sharesService ) { } param { ActivatedRouteSnapshot } route returns { Observable < any > } resolve ( route ) { const shareAccountId = route . paramMap . get ( 'shareAccountId' ) ; return this . sharesService . getSharesAccountData ( shareAccountId , true ) ; } }