如何在 Visual Studio 2015 中使用 Angular-Cli 和 ASP.NET Core 设置 asp.net angular 2 项目?

问题描述:

我使用 angular-cli 设置了 angular 2 项目,它对我来说效果很好.有什么方法可以将此项目添加到 Visual Studio 中的 asp.net core

I set up angular 2 project using angular-cli and it works prefect with me. there is any way of add this project to asp.net core in visual studio

我会将 Angular 2 项目移动到 ASP.NET Core 项目的根目录,然后移动 Angular 项目的 src 文件夹到 wwwroot - 并重命名对 src 文件夹的任何引用.

I would move the Angular 2 project into the root of the ASP.NET Core project, and then move the contents of the Angular project's src folder into wwwroot - and rename any reference to the src folder.

这很好地结合在一起,因为 wwwroot 用于客户端应用程序,而 Angular 2 正是如此.

This fits nicely together since wwwroot is for the client application, and Angular 2 is exactly that.