Reputation: 65
So I have checked many websites, that now it's possible to use .NET Core with Angular 2. My question now is, what is the use of .NET core in these applications?
In the tutorials on the internet, they only mostly use Angular 2 and typescript, nothing from .NET core, except the Startup.cs file.
Per my understanding .NET Core would take are of all the requests (I'm still new in .NET core, so not sure) like JSON, OData, e.t.c. (validating, retrieving data afterwards, and so on). So it would be like a serer side language.
But still, something doesn't look correct to me, so it would be great, if someone could explain it in real-life scenario.
Upvotes: 2
Views: 353
Reputation: 443
You can use .net Core to create an API that Angular then uses. But .net is only one of many possible options.
Upvotes: 1
Reputation: 14907
Angular of any version is server platform agnostic. .NET Core has nothing to do with Angular, as it works on the server side, while Angular works on the client side. The two interact, across HTTP, sure, but it doesn't matter what's on the back end.
As Angular 2 has a wide range of client-side uses, it's probably strongest as a framework to use for single page applications (SPA). To that end, using ASP.NET Core on the back end makes sense if you use it to build out API endpoints. Core and previous versions of MVC/Web API all do this well.
Upvotes: 5