1

I currently have a Play project where Angular Front-end is integrated into it with Gulp. Now I need to re-use the angular code into a .Net Web-Api project. Having APP and API as separate project will work. But to avoid dealing with different ports and CORS only option is to have one project that is deployed to one port where AngularJs project gets integrated along with Web Api project.

I have checked many question only this Stack-overflow answer seems relatable to my scenario but no luck with that solution too.

Does anyone know how to do that kind of integration. And is it possible to have integrated both into one project

1 Answer 1

0
  1. Create ASP.NET MVC application.
  2. Change default Index.cshtml with your index.html from Angular application. (You'll maybe need to correct paths to other files).

Now ASP.NET runs your application so you can add WebAPI Controllers instead of MVC Controllers inherit from ApiController.

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

Comments

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.