3

I'm looking for guidance on adding Angular (specifially the latest version of 4.0) to an existing ASP.NET WebForms project. I'm using Visual Studio 2017 and the .NET Framework version is 4.6.2.

I recently explored the official template project for Angular with ASP.NET Core but unfortunately since the dependencies, npm/NuGet packages came already set up for me I don't know how to add the proper, latest and greatest packages and extensions to an existing project. Not to mention that I'm using a completely different version of ASP.NET.

Any help is appreciated, Thanks!

UPDATE: I thought I should add more details. I specifically want to end up with Angular and at least webpack, Hot-module-replacement-middleware or some equivalent, BrowserLink, Karma + Jasmine and I want Angular to be using the latest TypeScript. This should make my question more specific I think.

2
  • 1
    Angular is a client side framework. Whether it's ASP.NET 4 or ASP.NET Core doesn't really make a difference. Commented Jun 26, 2017 at 15:09
  • @mason Right, sorry about that. I have updated my question to be more specific which includes some devenv-side things such as executing webpack via Visual Studio and HMR and to have these features be as nicely integrated with VS as they are in the ASP.NET Core template I linked if possible Commented Jun 26, 2017 at 15:12

1 Answer 1

3

Consider using the Angular CLI to build your Angular application and some editor such as VS Code that is friendly to the Angular CLI.

Consider not adding it to your Web Forms project and instead keeping it separate with its own functionality.

It can still communicate with whatever backend (Web API) you have.

Sign up to request clarification or add additional context in comments.

1 Comment

I think I will do this actually. Out of curiosity though, would I be able to embed a small angular view into an existing page of the separate WebForms project though?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.