如何在同一端口上运行两个 Angular 项目
我正在开发一个项目,其中有多个角度项目。我想在同一端口(localhost:4000)上启动它们。这可能吗? Angular 可以在同一端口上启动两个项目的应用程序吗?
I am developping a project where I have more than one angular projects. I would like to launch them on the same port (localhost:4000). Is this possible? Can Angular launch an app of two projects on the same port?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您只需将两个项目托管在各自的目录上(需要 IIS 配置)并使用 base-href 选项构建/部署您的应用程序:
You only have to host both project on their respective directory (IIS configuration needed) and build/deploy your apps with the base-href option:
可以将它们合并到一个项目中。
我相信您正在寻找这样的东西:
https://www.tektutorialshub.com/angular/angular -一个项目中的多个应用程序/
It would be possible to combine them under one project.
I believe you are looking for something like this:
https://www.tektutorialshub.com/angular/angular-multiple-apps-in-one-project/