作者:碳酸钙baby_849 | 来源:互联网 | 2023-06-15 09:35
HelloeveryoneIvebeentryingtodothiswithnoluckforafewdays.大家好,我一直试图这样做,几天没有运气。isthe
Hello everyone I've been trying to do this with no luck for a few days.
大家好,我一直试图这样做,几天没有运气。
is there anyway to load asynchronously some js scripts(which contain angular modules) and inject them to the running app after it has been initialized.
无论如何都要异步加载一些js脚本(包含角度模块)并在初始化后将它们注入正在运行的应用程序。
Basically I have a container DOM element that will be populated with some HTML requested from the server, based on this HTML code I will decide which js files (modules) will be required, then load them asynchronously inject the modules to the angular app and compile the content with the new injected modules.
基本上我有一个容器DOM元素,它将填充从服务器请求的一些HTML,基于这个HTML代码,我将决定将需要哪些js文件(模块),然后加载它们异步地将模块注入角度应用程序并编译新注入模块的内容。
I tried but every time I do the bootstrap method injecting the module the Main Controller fires up and erases all my scope state. :(
我试过,但每次我执行引导方法注入模块时,主控制器会启动并擦除我的所有范围状态。 :(
Any help around here?
这附近有什么帮助吗?
2 个解决方案