Ad

Sunday, January 10, 2016

AngularJS Services for dummies and beginners learning to code

Angular Services hold application data, the Model. An Angular Service can also talk to APIs and handle HTTP requests to get data from a 3rd party application. 

All Services are singletons. There should only be one copy of such service. 

Tod Motto a famous Angular developer and author points out that a Service's code cannot be run until the object is instant instantiated.

(what's not covered in this blog post is the service constructor and its usage with the new keyword)

2 comments: