Prettied, Linted and updated angular.json according to the latest schematic of Angular CLI.
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
This commit is contained in:
@ -1,16 +1,17 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { Role } from './role';
|
||||
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
|
||||
import { Role } from './role';
|
||||
import { RoleService } from './role.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class RoleResolver implements Resolve<Role> {
|
||||
constructor(private ser: RoleService, private router: Router) {}
|
||||
constructor(private ser: RoleService) {}
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<Role> {
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<Role> {
|
||||
const id = route.paramMap.get('id');
|
||||
return this.ser.get(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user