1
<u><strong>Services</strong></u><br /><br /><em>Syntax</em>: module.service( 'serviceName', function ); <br />When declaring serviceName as an injectable argument you will be provided with an instance of the function. In other words new FunctionYouPassedToService().<br /><br /><u><strong>Factories</strong></u><br /><br /><em>Syntax</em>: module.factory( 'factoryName', function ); <br />When declaring factoryName as an injectable argument you will be provided with the value that is returned by invoking the function reference passed to module.factory.<br /><br /><u><strong>Providers</strong></u><br /><br /><em>Syntax</em>: module.provider( 'providerName', function ); <br /><div>When declaring providerName as an injectable argument you will be provided with (new ProviderFunction()).$get(). The constructor function is instantiated before the $get method is called - ProviderFunction is the function reference passed to module.provider.</div><div></div><div>You can also refer below link for more info,</div><div>http://www.dotnet-tricks.com/Tutorial/angularjs/V2YS090914-Understanding-AngularJS-Factory,-Service-and-Provider.html</div><div></div><div></div><div></div>
