From 8d6dc0b9a7b3dbff5f8edb3217b60b0cc5b66be4 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Sat, 12 Nov 2011 14:57:43 -0800 Subject: del($eager): removed the support for $eager services --- docs/content/guide/dev_guide.services.registering_services.ngdoc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'docs/content/guide/dev_guide.services.registering_services.ngdoc') 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}); +}); -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) -- cgit v1.2.3