Initial commit for the Angular part. We are nowhere yet.

This commit is contained in:
Amritanshu
2019-06-14 00:32:34 +05:30
parent 1a1fa7881d
commit d59c60e81d
123 changed files with 3748 additions and 374 deletions

View File

@ -0,0 +1,19 @@
import {Injectable} from '@angular/core';
import {ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot} from '@angular/router';
import {GuestBookService} from './guest-book.service';
import {GuestBook} from './guest-book';
import {Observable} from 'rxjs/internal/Observable';
@Injectable({
providedIn: 'root'
})
export class GuestBookDetailResolver implements Resolve<GuestBook> {
constructor(private ser: GuestBookService, private router: Router) {
}
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<GuestBook> {
const id = route.paramMap.get('id');
return this.ser.get(id);
}
}