/** Angular Imports */ import { Injectable } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; /** rxjs Imports */ import { Observable } from 'rxjs'; /** Custom Services */ import { SystemService } from '../../system.service'; /** * Hook data resolver. */ @Injectable() export class HookResolver { /** * @param {SystemService} systemService System service. */ constructor(private systemService: SystemService) {} /** * Returns the manage hooks data. * @returns {Observable} */ resolve(route: ActivatedRouteSnapshot): Observable { const hookId = route.paramMap.get('id'); return this.systemService.getHook(hookId); } }