mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-03-29 00:09:01 +08:00
temporary backwards compatibility patch for
This commit is contained in:
@@ -227,6 +227,11 @@ function createScope(parent, providers, instanceCache) {
|
||||
instance[name] = bind(instance, fn);
|
||||
});
|
||||
instance.$inject.apply(instance, concat([Class, instance], arguments, 1));
|
||||
|
||||
//TODO: backwards compatibility hack, remove when we don't depend on init methods
|
||||
if (isFunction(Class.prototype.init)) {
|
||||
instance.init();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user