vs 2019社区和角度项目

时间:2019-12-26 03:05:38

标签: angular visual-studio

因此,安装了最新最好的Visual Studio社区,最新最好的Angular软件包, 包括有角项目:添加-新建项目-“ ASP.NET Core Web应用程序”

===== startup.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无法正常工作。请指教。 当我选择调试-开始调试时, 边缘-新标签-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一半无法启动。我在哪里看?

1 个答案:

答案 0 :(得分:0)

也许尝试在ClientApp级别打开命令提示符并输入“ ng serve”?

相关问题