Tuesday 18 August 2015

Difference between Service, Provider and Factory in AngularJs

In this blog we will discuss about the differences b/w services ,provider and factory in angular jS
a)Service-
This will return the actual function with an instance of the function.
Syntax-
module.service( 'serviceName', function );
b)Factory-
This will return the actual value returned by the function.
Syntax-
module.factory( 'factoryName', function );
c)Provider-
This will return the value returned by the $get function of the function.
Syntax-
module.provider( 'providerName', function );
TO read full blog about Difference between Service, Provider and Factory in AngularJs visit FindNerd.


No comments:

Post a Comment