[英]vs 2019 community and angular project
所以安装了最新最好的visual studio社区,最新最好的Angular包,包括angular项目:添加-新建项目-“ASP.NET Core Web Application”
====== 启动.cs
{
app.UseSpa(spa =>
{
// To learn more about options for serving an Angular SPA from ASP.NET Core,
// see https://go.microsoft.com/fwlink/?linkid=864501
spa.Options.SourcePath = "ClientApp";
if (env.IsDevelopment())
{
**spa.UseAngularCliServer(npmScript: "start")**
});
};
}
====== 在 spa.UseAngularCliServer(npmScript: "start") 上失败了
我不知道“ClientApp”从何而来。 所以我假设 Angular CLIent Server 不工作。 请指教。 当我选择调试 - 开始调试时,Edge - 新选项卡 - https://localhost:44344/启动。
An unhandled exception occurred while processing the request.
TimeoutException: The Angular CLI process did not start listening for requests
within the timeout period of 0 seconds. Check the log output for error information.
Microsoft.AspNetCore.SpaServices.Extensions.Util.TaskTimeoutExtensions.
WithTimeout<T>(Task<T> task, TimeSpan timeoutDelay, string message)
======
我在哪里看?
一切都编译并执行,但 javascript 部分没有启动。 我在哪里看?
也许尝试在 ClientApp 级别打开命令提示符并输入“ng serve”?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.