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. We bet that if we were to try this in standard jQuery or some other framework, it would require substantially more effort as compared to Angular.
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 Angular construct that we touched upon was the HTTPClient
, which is the primary service for connecting to any HTTP backend.
You also learned how the HTTPClient
module uses Observables. For the first time, in this chapter, we created our own Observable and explained how to create subscriptions to those Observables.
We fixed our Personal Trainer app so that it uses the HTTPClient
module to load and save workout data (note that data persistence for...