Blacked and isorted the python files
Prettied and eslinted the typescript/html files
This commit is contained in:
@ -1,18 +1,18 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot} from '@angular/router';
|
||||
import {SectionService} from './section.service';
|
||||
import {Section} from '../core/section';
|
||||
import {Observable} from 'rxjs/internal/Observable';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
|
||||
import { Section } from '../core/section';
|
||||
|
||||
import { SectionService } from './section.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class SectionResolver implements Resolve<Section> {
|
||||
constructor(private ser: SectionService) {}
|
||||
|
||||
constructor(private ser: SectionService, private router: Router) {
|
||||
}
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<Section> {
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<Section> {
|
||||
const id = route.paramMap.get('id');
|
||||
return this.ser.get(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user