我在Google App Engine上使用Python编写了一个应用程序,该应用程序在端口8080上运行并加载了Angular应用程序。 Angular服务器在端口4200上运行,索引页面将按以下方式加载Angular资源:
<script type="text/javascript" src="http://localhost:4200/static/build/main.js"></script>
<script type="text/javascript" src="http://localhost:4200/static/build/runtime.js"></script>
<script type="text/javascript" src="http://localhost:4200/static/build/polyfills.js"></script>
<script type="text/javascript" src="http://localhost:4200/static/build/styles.js"></script>
<script type="text/javascript" src="http://localhost:4200/static/build/vendor.js"></script>
现在,我的Angular应用已经增长了很多,我想将代码重构为模块并使用延迟加载。问题是,延迟加载的模块尝试在8080而不是4200上加载。我的问题是如何配置Angular应用程序在端口4200上加载这些模块?我正在使用Angular 7。 谢谢您的帮助!
答案 0 :(得分:0)
您可以检查以下stackoverflow答案。这可能对您有帮助。您可以尝试遵循两种方法。