aboutsummaryrefslogtreecommitdiffstats
path: root/src/Angular.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/Angular.js')
-rw-r--r--src/Angular.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Angular.js b/src/Angular.js
index f1eb74ca..0ef1af8e 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -952,8 +952,12 @@ function angularInit(config, document){
var autobind = config.autobind;
if (autobind) {
- var element = isString(autobind) ? document.getElementById(autobind) : document;
- compile(element)().$apply();
+ var element = isString(autobind) ? document.getElementById(autobind) : document,
+ injector = createInjector(),
+ scope = injector('$rootScope');
+
+ compile(element)(scope);
+ scope.$apply();
}
}