aboutsummaryrefslogtreecommitdiffstats
path: root/src/Scope.js
diff options
context:
space:
mode:
authorDi Peng2011-06-22 11:15:42 -0700
committerIgor Minar2011-06-23 08:06:24 -0700
commitbad62d87a1785f11b0df72ad597b9064517997cf (patch)
treeae170bcbc912d943c92728292fbc0c62ffa0bae2 /src/Scope.js
parent65b6e4874275986607efaf66c3814f3b3a559399 (diff)
downloadangular.js-bad62d87a1785f11b0df72ad597b9064517997cf.tar.bz2
fix:scope - reintroduce support for eager services
8cad231 broke $eager services Problem is that the injector.eager function is not invoked when a new scope is created. Added a test to make sure service is eagerly instantiated. Closes #403
Diffstat (limited to 'src/Scope.js')
-rw-r--r--src/Scope.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Scope.js b/src/Scope.js
index b2b8cdb4..a63cb8f7 100644
--- a/src/Scope.js
+++ b/src/Scope.js
@@ -525,7 +525,7 @@ function createScope(parent, providers, instanceCache) {
* @param {string} serviceId String ID of the service to return.
* @returns {*} Value, object or function returned by the service factory function if any.
*/
- instance.$service = createInjector(instance, providers, instanceCache);
+ (instance.$service = createInjector(instance, providers, instanceCache)).eager();
}
$log = instance.$service('$log');