I've just begun learning Angular 2 and Typescript in order to create Single Page Application, and it seems to me that I'll be able to use either Angular (SPA) or ASP.NET Core views (traditional web application), but not both. Is that true ? I've spend lots of time learning ASP.NET Core views (tag helpers, view components, etc. I'll be glad to get some advice...
It is depends what you are trying to achieve but for the most cases you do not need to run any server side HTML renderers like ASPNET MVC under the hood of your Angular 2 application.
The best practice is to keep the SPA separate and just to build API using server side technology, in you case ASPNET WebApi. This way your SPA will be completely decoupled from the server relying just on your API.
UPDATE:
Currently I am involving in the project running backend in Azure. We are running micro services /w ASPNET Core WebAPI and we have Angular 2 app talking to our API. We are using vscode for Angular 2 development and Visual Studio 2017 for .NET related stuff.
If you are care about SEO there is such thing called Angular Universal which is already part of the Angular 4 core (which is gonna be finally released like next week) which is taking care of server side rendering but you have to setup your server to be able to handle that scenario.
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