简体   繁体   English

Visual Studio中的默认角度项目模板失败,首次运行时未处理异常

[英]Default angular project template from Visual Studio fails with exception unhandled on first run

I just created a new asp.net core app with an angular template and when I started it I received an exception 我刚刚用一个角度模板创建了一个新的asp.net核心应用,当我启动它时,我收到了一个异常

  • JavaScript runtime error: Unable to get property 'apply' of undefined or null reference JavaScript运行时错误:无法获取未定义或空引用的属性“应用”

on this line 在这条线上

function combine(options) {
   return ((Object)).assign.apply(((Object)), [{}].concat(options));}

in the vendor.js file 在vendor.js文件中

anybody know why or how to fix it? 有人知道为什么或如何解决它吗? Should I have an exception thrown on a default project template like this? 我应该在这样的默认项目模板上引发异常吗?

Try to avoid using VS Angular template, as it doesn't provide best experience for Angular app setup.You can follow steps in this article or create empty ASP.NET Web API project, install Node.js & Angular-Cli. 尝试避免使用VS Angular模板,因为它不能为Angular应用程序安装提供最佳体验。您可以按照本文中的步骤操作,也可以创建空的ASP.NET Web API项目,安装Node.js和Angular-Cli。 Then you can run 'npm i npm' and 'ng new myAppName' in project's root directory. 然后,您可以在项目的根目录中运行“ npm i npm”和“ ng new myAppName”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM