import { Injectable } from '@angular/core' ; import { ActivatedRouteSnapshot , Resolve , RouterStateSnapshot } from '@angular/router' ; import { Observable } from 'rxjs' ; import { ObjectService } from '../services/object.service' ; import { RenderResult } from '../models/cmdb-render' ; /**
 * Service class for resolving a PublicID to a `RenderResult`.
 */ @ Injectable ( { providedIn : 'root' } ) export class ObjectViewResolver implements Resolve < RenderResult > { constructor ( public objectService ) { } /**
     * Resolves the passed PublicID to a `RenderResult`  RenderResult .
     *  param route param state public resolve ( route , state ) { const publicID = + route . paramMap . get ( 'publicID' ) ; return this . objectService . getObject ( publicID ) ; } }