Book Image

Data Oriented Development with Angularjs

Book Image

Data Oriented Development with Angularjs

Overview of this book

Table of Contents (17 chapters)
Data-oriented Development with AngularJS
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 2. Working with Data

Now that we've already covered the basics of AngularJS and data binding, let's take a deep dive into Angular and see what dependency injection is, why it is needed, and how to do dependency injection in Angular. We'll also see the role of filters and how to write custom filters. Then, we'll see how to call remote APIs using the $http service and the $resource service. Finally, we'll study how the $resource service is an abstraction on top of the $http service and how it makes communication with RESTful APIs easier. So, let's get started.

In this chapter, we will cover the following topics:

  • Dependency injection and why it is needed

  • How dependency injection is achieved in Angular

  • The role of filters and how to implement them

  • What are promises?

  • How to communicate with backend APIs using the $http service

  • How the $resource service makes communication with RESTful services easier