问题描述
我有这个模板
在组件this中使用模块中的路由解析器获取observable
和 ts 文件
ngOnInit(): void {
this.route.data.subscribe(data=>{
const resolvedData:ProyectoResolved=data['resolvedData'];
console.log('MainContent-ngOnInit: ',resolvedData.proyecto);
this.errorMessage$=of(resolvedData.error);
this.proyecto$=of(resolvedData.proyecto);
}
);
但是当我在控制台中选择另一个项目时,我看到新项目已解决,但模板没有刷新,尽管我在 ngOnInit 中使用了 this.route.data.subscribe
有什么想法吗?
谢谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)