All Questions

3058
votes
30answers
718235 views

AngularJS: Service vs provider vs factory

What are the differences between a Service, Provider and Factory in AngularJS?
3
votes
1answers
411 views

Angularjs provider with different configurations in different modules

I'd like to know if there is a way of making the configuration of a provider unique not across the entire application, but only across the module that is configuring it. For example, I have a module ...
2
votes
1answers
160 views

How to prevent direct access to properties when inheriting from a base provider?

This is a follow up to How to inherit from base provider (not the provider factory)?. The proposed solution suggests a combination of angular.extend and angular.copy (which can be done with just angul...
2
votes
2answers
403 views

Angular "Unkown Provider" - how to use a factory within routeProvider configuration?

While playing around with Angular I try to understand better how to use factory, services, constants, routing and other core concepts. So I build a simple demo app with node, express, jade and angular...
0
votes
1answers
109 views

How to inherit from base provider (not the provider factory)?

Say I have this base provider: angular.module('app').provider('BaseClient', function () { this.setSomething = function (something) { // Store `something` somewhere return this; ...

Previous Next