/** Angular Imports */ import { Injectable } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ import { Observable } from 'rxjs'; /** Custom Services */ import { OrganizationService } from 'app/organization/organization.service'; /** * Teller data resolver. */ @Injectable() export class TellerResolver { /** * @param {OrganizationService} organizationService Organization service. */ constructor(private organizationService: OrganizationService) {} /** * Returns the teller data. * @returns {Observable} */ resolve(route: ActivatedRouteSnapshot): Observable { const tellerId = route.paramMap.get('id'); return this.organizationService.getTeller(tellerId); } }