What is a service in Angular?

Angular services are singleton objects that get instantiated only once during the lifetime of an application. They contain methods that maintain data throughout the life of an application, i.e. data does not get refreshed and is available all the time. A service is used when a common functionality needs to be provided to various modules. Services allow for greater separation of concerns for our application and better modularity by allowing us to extract common functionality out of components.