Do you know how to implement Angular/Cli (Angular 4) with ASP NET MVC. I made a lot of things and nothing, i can not install it, if you know please help me.
It's difficult to achieve, purely because the @angular/cli
relies heavily on webpack. It's designed to be much more standalone, at dev time at least. So you have two options available to you: embrace the separation, or integrate webpack dev server into ASP.NET as middleware.
If you take the former option, you'll just start them up separately, and then when you deploy the application - will copy the output html, css and javascript into the /public
or /assets
directory of your mvc site. (Typically as a part of your build pipeline.
Alternatively, if you can use aspnet core (which I would recommend), you can use the JavascriptServices package by the core team and they take care of the hard plumbing for you. It's pretty cool, you should check it out:
https://github.com/aspnet/JavaScriptServices http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/
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