- 我确实有多个页面,每个页面都有不同的 API 调用。那么我是否需要为每个页面创建不同的解析器?
- 我可以在不添加新服务的情况下实现对主要服务的解析吗?
我这样写了转售服务
resolve(route: ActivatedRouteSnapshot, rstate: RouterStateSnapshot): Observable <any>{
return this.http.get(''+this.webAPI+'getproducts', {
headers: {
"Authorization": "Token " + this.token,
},
withCredentials: true
}
);
}
在我的构造函数里面是
this.actr.data.map(data => data.cres ).subscribe((response) =>{
console.log("reas", response)
})