Open oridark opened 4 years ago
我理解就是主应用写个空的模板匹配所有路由,然后由qiankun按子应用路由渲染[innerHtml]
我试了angular作为主应用,能加载,但是子应用的angular感觉没有执行。页面显示为空。这个大家知道什么原因吗?
已经进入了 runAfterFirstMounted
runAfterFirstMounted
同问呐
问题已经解决,手工执行脏检查就行了 changeDetectorRef.detectChanges();
@waltbest2 请问有示例吗,官网的示例angular执行报错。在什么位置执行changeDetectorRef.detectChanges();
@waltbest2 请问有示例吗,官网的示例angular执行报错。在什么位置执行changeDetectorRef.detectChanges();
官网实例是子应用,target改成es5就可以了。
changeDetectorRef.detectChanges();根据你自己的代码安排,在主应用的render函数中回填content后,直接加这一句就行了。
做了一个angular9为主应用,angular9/angularjs为子应用的示例,正好符合issue的要求。
https://github.com/chengxuanxie/qiankun-angular-angularjs/blob/master/README.md
Background
公司项目是纯angular的,几个项目需要融合,主应用也是angular
Proposal
Describe the solution you'd like, better to provide some pseudo code.
Additional context
Add any other context or screenshots about the feature request here.