blob: fa3e0ce7c33db97b3844caa197d4bf00f6eb98fd [file] [log] [blame]
import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
import { ClusterService } from './cluster.service';
import { Cluster } from './cluster.model';
/* not using this resolver for now since it will break the page when reload the page */
@Injectable()
export class ClusterResolver implements Resolve<Cluster> {
constructor(private clusterService: ClusterService) {}
resolve(route: ActivatedRouteSnapshot) {
return this.clusterService.get(route.paramMap.get('name'));
}
}