Initial Commit
This commit is contained in:
18
otis/src/app/courts/court-list-resolver.service.ts
Normal file
18
otis/src/app/courts/court-list-resolver.service.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve } from '@angular/router';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
|
||||
import { Court } from '../core/court';
|
||||
|
||||
import { CourtService } from './court.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class CourtListResolver implements Resolve<Court[]> {
|
||||
constructor(private ser: CourtService) {}
|
||||
|
||||
resolve(): Observable<Court[]> {
|
||||
return this.ser.list();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user