We've already mentioned services several times
in the last few chapters. You have already used several built-in AngularJS
$rootScope etc. But, in a real world application, the
built-in services are not always going to be sufficient so you'll need to
create custom services. This chapter will give you a comprehensive guide to
three critical components of AngularJS: services,
The main purpose of these components is that they hold some logic that's required at multiple points within your app. Although services, factories and providers are all used to accomplish the same task (encapsulating repetitive logic), there are subtle differences ...