diff options
Diffstat (limited to 'src/Angular.js')
| -rw-r--r-- | src/Angular.js | 8 |
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(); } } |
