We started this chapter with the aim of creating an AngularJS app that is more complex than the sample we created in the first chapter. The 7 Minute Workout app fitted the bill and we learned a lot about the AngularJS framework while building this app.
We started with defining the functionality of the 7 Minute Workout app. We then focused our efforts on defining the code structure for the app. In the process, we learned about the building blocks of AngularJS namely controllers, directives, filters, and services and how these components need to be organized in our codebase.
To build the app, we started by defining the model of the app. Once the model was in place, we started the controller implementation. While implementing the controller we learned about DI, services, the AngularJS watch infrastructure, and the AngularJS Promise API.
Once we had a fully functional controller, we created a supporting view for the app. We used some new directives: ng-src
and ng-style
. The ng-src
directive...