DEV Community

Angular and ASP.NET Core

Rui Figueiredo on March 01, 2018

The Angular CLI provides a way to develop front-end applications using angular that hides a lot of details. For example there's no requirement to u...
Collapse
 
ajamrozek profile image
alex jamrozek

You say implementing the Angular app inside ASP.Net Core "seems to be a common approach". I've had experiences w/Angular bootcamps and onsite adoptions that found it uncommon. The middleware hooks are handy, but totally handle-able by the Angular componentry as well. I could see .Net devs not willing to let go of their stack and knee-jerk reacting by making every site an ASP.Net site. I'd also consider some of the Authorize handlers & policies, but then it starts to bleed right into a position I've held against the Angular wave...why not just use MVC Views with a 2-way binding and SPA routing lib instead of Angular (CLI). I guess I'm not sold. Are there any better reasons to do this than the middleware and other lifecycle event hooks?

Collapse
 
ruidfigueiredo profile image
Rui Figueiredo

I don't think it's a good idea at all and I think you are probably right about it being a knee jerk reaction of making every website an ASP.NET website, even if it's mostly serving just static HTML and JavaScript

Collapse
 
coolgoose profile image
Alexandru Bucur • Edited

Thanks for the info.
As a quick tip, you can use csharp after the code ticks to highlight the c# code nicely.

Collapse
 
rafalpienkowski profile image
Rafal Pienkowski

Awesome post!

It clears most problems I had when I've tried to set up .Net Core and Angular project.

Collapse
 
ruidfigueiredo profile image
Rui Figueiredo

Thanks :)

It's not an easy problem to tackle.