28 lines
616 B
TypeScript
28 lines
616 B
TypeScript
/** Angular Imports */
|
|
import { Injectable } from '@angular/core';
|
|
|
|
/** rxjs Imports */
|
|
import { Observable } from 'rxjs';
|
|
|
|
/** Custom Services */
|
|
import { OrganizationService } from '../organization.service';
|
|
|
|
/**
|
|
* Employees data resolver.
|
|
*/
|
|
@Injectable()
|
|
export class EmployeesResolver {
|
|
/**
|
|
* @param {OrganizationService} organizationService Organization service.
|
|
*/
|
|
constructor(private organizationService: OrganizationService) {}
|
|
|
|
/**
|
|
* Returns the employees data.
|
|
* @returns {Observable<any>}
|
|
*/
|
|
resolve(): Observable<any> {
|
|
return this.organizationService.getEmployees();
|
|
}
|
|
}
|