tanshu
5ea09df272
Now all that is needed is to make it ready for strict compiling. Removed eslint-plugin-prettier as it is not recommended and causes errors for both eslint and prettier Bumped to v8.0.0
18 lines
431 B
TypeScript
18 lines
431 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { Resolve } from '@angular/router';
|
|
import { Observable } from 'rxjs/internal/Observable';
|
|
|
|
import { Role } from './role';
|
|
import { RoleService } from './role.service';
|
|
|
|
@Injectable({
|
|
providedIn: 'root',
|
|
})
|
|
export class RoleListResolver implements Resolve<Role[]> {
|
|
constructor(private ser: RoleService) {}
|
|
|
|
resolve(): Observable<Role[]> {
|
|
return this.ser.list();
|
|
}
|
|
}
|