diff options
| author | Misko Hevery | 2011-04-18 16:33:30 -0700 |
|---|---|---|
| committer | Misko Hevery | 2011-06-08 15:21:31 -0700 |
| commit | 8cad231bd219eddd518de8b8bd040d3f12f08d17 (patch) | |
| tree | 75016fa6de683a877916f45a0fd06b1d0f312231 /src/Scope.js | |
| parent | 0e17ade959cc77369dc102d180e43be2af68505a (diff) | |
| download | angular.js-8cad231bd219eddd518de8b8bd040d3f12f08d17.tar.bz2 | |
Refactor injector to have invoke method for speed reasons
Diffstat (limited to 'src/Scope.js')
| -rw-r--r-- | src/Scope.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Scope.js b/src/Scope.js index 1ab583e8..b2b8cdb4 100644 --- a/src/Scope.js +++ b/src/Scope.js @@ -472,7 +472,7 @@ function createScope(parent, providers, instanceCache) { forEach(Class.prototype, function(fn, name){ instance[name] = bind(instance, fn); }); - instance.$service.apply(instance, concat([Class, instance], arguments, 1)); + instance.$service.invoke(instance, Class, slice.call(arguments, 1, arguments.length)); //TODO: backwards compatibility hack, remove when we don't depend on init methods if (isFunction(Class.prototype.init)) { @@ -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); } $log = instance.$service('$log'); |
