umijs / qiankun

📦 🚀 Blazing fast, simple and complete solution for micro frontends.
https://qiankun.umijs.org
MIT License
15.73k stars 2.01k forks source link

qiankun 集成AngularJS 为子应用未渲染 #1607

Closed 15738039217 closed 3 years ago

15738039217 commented 3 years ago

What happens?

qiankun 集成AngularJS 为子应用未渲染

作者你好,目前的需求是主应用是vue3,集成乾坤,子应用集成AngularJS单页面应用,我实现的是,子应用的index.html 页面引入AngularJS,然后页面写一些AngularJS 语法,变量等,单独运行子项目是可以被加载并成功渲染dom的,我运行在主项目内,运行主项目+子项目,确认子项目已经被成功挂载,子项目的bootstrap,mount,unmount 已经执行,但是AngularJS模块没有被执行,index.html页面AngularJS模块显示空白,其他模块的可以显示,我尝试在页面引入vue.js 试一下看看是都能被加载,结果,vue.js 不管单独运行,还是在qiankun环境下都能运行,目前找不到AngularJS 未能加载的原因, 下面是index.html 的简单代码,引入的版本 AngularJS v1.4.6,和 vue.js CDN,主应用 qiankun": "^2.0.0-3", 求有大神给解决方案,qq->1693885383

Context

15738039217 commented 3 years ago

`<!DOCTYPE html>

vue/angular
{{m}}
{{msg}}

`

github-actions[bot] commented 3 years ago

Hello @15738039217. In order to facilitate location and troubleshooting, we need you to provide a realistic example. Please forking these link codesandbox or clone qiankun examples to your GitHub repository.

你好 @15738039217, 为了方便定位和排查问题,我们需要你提供一个重现实例,请提供一个尽可能精简的链接 codesandbox 或直接 clone qiankun examples,并上传到你的 GitHub 仓库。

github-actions[bot] commented 3 years ago

Since the issue was labeled with Need Reproduction, but no response in 30 days. This issue will be close. If you have any questions, you can comment and reply. 由于该 issue 被标记为需要可复现步骤,却 30 天未收到回应。现关闭 issue,若有任何问题,可评论回复。

LKCheng commented 2 years ago

楼主解决了嘛?我的也是,子应用 AngularJS1.3.x 不报错. 一直在显示加载(子应用的loading)

llllllllllx commented 2 years ago

你这种情况可能是在开启了样式隔离导致的,可以参考single-spa-angular1中的返回的mount实现(不能解决在开启shadow-dom下不执行逻辑的问题,需要自己修改一下),重新使用angular.bootstrap绑定一下页面与模块应该就可以了