Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Problem

I work on asp.net core 2.1 project with sql server 2014

this project is mvc controller not web api .

we decide to make client side with angular 7 so that i will have two project

project have angular client side

another project is asp.net core mvc or web api server side .

so that my question

Are my project mvc controller must be web api to connect to angular ?

What I have tried:

Are project must be web api to connect to angular ?
Posted
Updated 14-Feb-19 23:47pm
Comments
Afzaal Ahmad Zeeshan 15-Feb-19 7:52am    
Well, yes, because Angular will most probably be loading the data as JSON, to render the content on the page.

If you return the HTML pages, or other content types then Angular will either have to render them as iframes, or inject them as HTML content—this HTML should be only the content to read, not the complete HTML document with html, head or body elements.

1 solution

Your project must have a Web API controller.
Please have a look at this article:
Angular 7 with .NET Core 2.2 - Global Weather (Part 1)[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900