我正在从FORM提交一些值,现在我需要知道如何将这些值传递给解析器。
我正在传递我从component.ts
valuesReceivedFromForm(){
const tt= this.myFrom.value; // These are the values I need to pass to the resolver
this.router.data.subscribe((any: any) => {
});
解析器
@Injectable()
export class MyResolver implements Resolve<any> {
constructor(private service{}
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
// How to retrieve the values that was in my form here.
return this.service.sendToPerson( xxxxxx );
}
}