In AngularJS, a service is a function, or object, that is available for, and limited to, your AngularJS application.AngularJS has about 30 built-in services. One of them is the $location service.The $location service has methods which return information about the location of the current web page
AngularJS supports the concepts of Separation of Concerns using services architecture. Services are javascript functions and are responsible to do a specific tasks only. ... Services are normally injected using dependency injection mechanism of AngularJS.
Services are a set of code that can be shared by different components of an application. So for example if you had a data component that picked data from a database, you could have it as a shared service that could be used across multiple applications.