import { ActivatedRouteSnapshot , Resolve , RouterStateSnapshot } from '@angular/router' ; import { Observable } from 'rxjs' ; export class DetailResolver implements Resolve < DetailModel > { data : DetailModel ; constructor ( detailData ) { this . data = detailData ; } resolve ( route , state ) { return this . data ; } ; }