Hello, i've used this tutorial to get familar with AngularJs.
Breadcrumbs are working, except the part with the resolver.
How does a Resolver has to look for this lib? Already tried to use the Resolver from the repo but i still got the message that person is undefined.
I would be grateful for help
My Resolver (for testing)
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { Injectable } from '@angular/core';
import { IRecipe } from "../_class/person";
@Injectable()
export class PersonResolver implements Resolve<IRecipe> {
constructor(private service: PersonService) { }
public resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<IPerson> {
const id = route.params.id;
if (id) {
return Promise.resolve({
id: 900,
title: "666666"
});
} else {
return Promise.resolve({
id: 0,
title: ""
});
}
}
}
Hello, i've used this tutorial to get familar with AngularJs. Breadcrumbs are working, except the part with the resolver. How does a Resolver has to look for this lib? Already tried to use the Resolver from the repo but i still got the message that person is undefined.
I would be grateful for help
My Resolver (for testing)