We now have an app that can do a lot of stuff. It can run workouts, load workouts, save and update them, and track history. And if we look back, we have achieved this with minimal code. I can bet if we try this in standard jQuery or some other framework, it would require substantially more effort as compared to AngularJS.
We started the chapter by providing a MongoDB database on MongoLab servers. Since MongoLab provided a RESTful API to access the database, we saved some time by not setting up our own server infrastructure.
The first AngularJS construct that we touched upon was the $http
service. $http
is the primary service for connecting to any HTTP backend.
You learned about the $http config
object and how it is used to configure any HTTP request. We also saw how the standard $http
configuration helps us to readily consume server endpoints that consume and return JSON data.
You also learned how the complete $http
infrastructure is based on promises and callback invocation and is totally...