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
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.
This fits nicely together since wwwroot
is for the client application, and Angular 2 is exactly that.
2017-06-16 Now that the players in this scenario have matured, my favorite solution for setting this up is Rick Strahl's AlbumViewer application. He has used it as a sample for his numerous blog posts on ongoing development of both technologies. It is the cleanest and most adaptable solution so far. It uses the Angular cli tool (built on top of Webpack) to run all development and production workflow.
The development is done in a separate website project in the solution and the production build process copies the contents of the Angular dist folder to wwwroot for the final production build. Clean, simple and easy to follow.
This is the best answer I have seen to this question so far. Combine angular-cli with asp.net core
From the research I have done on the subject, the two are not making it easy to develop each other in the same environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With