Interviews3 answers
What is the role of services in AngularJS ?
3 Answers
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.
Asad IlyasPosted Apr 12, 2018, 8:12 AM EDT
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.
SAUMYA TIWARIPosted Feb 9, 2018, 6:43 AM EST
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
Rajneesh ChaubeyPosted Feb 6, 2018, 10:19 PM EST


