Please Note: I have read some questions like this in Stack Overflow but did't get the clear concept that I wanted from those answers.
I have crystal clear concept of why and how to use AngularJS with ASP.NET Web API. But I am confused about the use of AngularJS with ASP.NET MVC!
In Case of AngularJS with ASP.NET Web API:
Web API controller method returns data and AngularJS call the Web API controller method and capture the data and then render the data in the View. This is pretty much logical!
In Case of AngularJS with ASP.NET MVC:
ASP.NET MVC Controller method itself returning View/View with data. Then what is the use of AngularJS with ASP.NET MVC?
In spite of that, if I want to use AngularJS with ASP.NET MVC then I have to return JSON instead of MVC view from ASP.NET MVC controller method.
My Questions are:
- Is it logical to return JSON instead of MVC view from ASP.NET MVC controller method for the purpose of using AngularJS with ASP.NET MVC? If I do so, is there any benefit?
- What is the actual use AngularJS with ASP.NET MVC? Or Where can I use AngularJS with ASP.NET MVC?