aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/guide/dev_guide.services.registering_services.ngdoc
diff options
context:
space:
mode:
authorMisko Hevery2011-11-12 14:57:43 -0800
committerMisko Hevery2011-11-14 20:31:19 -0800
commit8d6dc0b9a7b3dbff5f8edb3217b60b0cc5b66be4 (patch)
treea1c21a3d6a13c36460cd33e326bff5a4b2c61462 /docs/content/guide/dev_guide.services.registering_services.ngdoc
parentacbd7cdf320f0570fcc1952c8680d4c78bc8fa2c (diff)
downloadangular.js-8d6dc0b9a7b3dbff5f8edb3217b60b0cc5b66be4.tar.bz2
del($eager): removed the support for $eager services
Diffstat (limited to 'docs/content/guide/dev_guide.services.registering_services.ngdoc')
-rw-r--r--docs/content/guide/dev_guide.services.registering_services.ngdoc6
1 files changed, 1 insertions, 5 deletions
diff --git a/docs/content/guide/dev_guide.services.registering_services.ngdoc b/docs/content/guide/dev_guide.services.registering_services.ngdoc
index 24a21852..25a51504 100644
--- a/docs/content/guide/dev_guide.services.registering_services.ngdoc
+++ b/docs/content/guide/dev_guide.services.registering_services.ngdoc
@@ -33,13 +33,9 @@ angular.module.ng('service id', function() {
var shinyNewServiceInstance;
//factory function body that constructs shinyNewServiceInstance
return shinyNewServiceInstance;
-}, {$eager: true});
+});
</pre>
-While it is tempting to declare services as eager, only in few cases it is actually useful. If you
-are unsure whether to make a service eager, it likely doesn't need to be. To be more specific, a
-service should be declared as eager only if it fits one of these scenarios:
-
* Nothing in your application declares this service as its dependency, and this service affects the
state or configuration of the application (e.g. a service that configures `$route` or `$resource`
services)