One of the most fundamental components of AngularJS functionality is services. Services provide task-based functionality to your applications. Think about a service as a chunk of reusable code that performs one or more related tasks. AngularJS provides several built-in services and also allows you to create your own customized services.
This chapter introduces the AngularJS services. You will get a chance to see and implement some of the built-in services, such as $http
for webserver communication. You will also learn about the different methods for creating custom services and how to implement them.