/** Angular Imports */ import { Injectable } from '@angular/core' ; import { Resolve , ActivatedRouteSnapshot } from '@angular/router' ; /** rxjs Imports */ import { Observable } from 'rxjs' ; /** Custom Services */ import { AccountingService } from '../accounting.service' ; /**
 * Transaction data resolver.
 */ @ Injectable ( ) export class TransactionResolver implements Resolve < Object > { param { AccountingService } accountingService constructor ( private accountingService ) { } returns { Observable < any > } resolve ( route ) { const transactionId = route . paramMap . get ( 'id' ) ; return this . accountingService . getJournalEntry ( transactionId ) ; } }