You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
scrutiny/webapp/frontend/src/app/modules/dashboard/dashboard.resolvers.ts

37 lines
993 B

import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { Observable } from 'rxjs';
import { DashboardService } from 'app/modules/dashboard/dashboard.service';
@Injectable({
providedIn: 'root'
})
export class DashboardResolver implements Resolve<any>
{
/**
* Constructor
*
* @param {FinanceService} _dashboardService
*/
constructor(
private _dashboardService: DashboardService
)
{
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Resolver
*
* @param route
* @param state
*/
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<any>
{
return this._dashboardService.getData();
}
}