Last post Apr 29, 2014 03:58 PM by BrockAllen
Apr 29, 2014 03:41 PM|samegoldinButBetter|LINK
I am studying a learning application that was developed to demostrate how to use an MVC framework with AngularJS for developing SPA applications. One thing is not clear to me. I dont see any use of C# controllers at all. The data for the app lives on the
Internet and the app uses Web API to access it. But I am going to use SQL Server for data in the future. Getting that data is what server controllers are for. So, my question is: what is a proper way of designing a pipeline between Angular controllers and
Apr 29, 2014 03:45 PM|BrockAllen|LINK
If you're doing Angular in the client, then you'r typically implement Web API on the server for the Ajax calls. This is how you'd get to your database.
Apr 29, 2014 03:50 PM|samegoldinButBetter|LINK
You are saying that I am going to use Web API in Angular controllers to call server for data?
Apr 29, 2014 03:58 PM|BrockAllen|LINK
I'm saying that if you're doing Angular, then you'd need to make Ajax calls to your server if they want to get at your database. To handle those Ajax calls, then you need some code on the server and Web API is a common choice for that code. But you could
also use MVC (albeit in a limited way) or it could be something else like Node.js.