import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
import { SchedulerTaskInitialData } from '../beans/scheduler-task-initial-data';
import { SchedulerTaskService } from '../services/scheduler-task.service';

@Injectable()
export class SchedulerTaskInitialDataResolver implements Resolve<SchedulerTaskInitialData> {
    constructor(protected service: SchedulerTaskService) {
    }

    resolve(route: ActivatedRouteSnapshot) {
        return this.service.getInitialData();
    }
}