【发布时间】:2018-06-28 11:16:34
【问题描述】:
使用 .NET Core 和 Angular 自托管 UI 和 API
如何设置我的 angular / vs 解决方案,以便我可以运行以下场景。
导航到 localhost:4200/home 即在 chrome 中 我单击一个按钮,该按钮(在角度代码中)调用“api/values”而不是“localhost:5000/api/values”
这是我复制我的解决方案所采取的步骤。
vs代码终端内
ng new myui --routing
cd myui
ng serve ## opens the default angular project on localhoost:4200/
在这个项目的目录下打开一个终端
dotnet new webApi ##
我通过更改launchsettings.json 中的设置来运行它的大多数尝试都以找不到页面错误或ui当前正在使用该端口而告终
【问题讨论】:
标签: angular visual-studio-code .net-core