Skip to content

Commit

Permalink
Add ng-app: module; on bootstrap to allow a LATER angular-scenario.an…
Browse files Browse the repository at this point in the history
…gularInit() to find the app element.
  • Loading branch information
chrismilleruk committed Mar 20, 2013
1 parent bb22821 commit 8f3f38d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/lib/angular/angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,12 @@ function bootstrap(element, modules) {
scope.$apply(function() {
element.data('$injector', injector);
compile(element)(scope);

// Handle angular-scenario.angularInit() race condition..
// ..when it runs in the future
var cls = ': ' + modules[2] + ';';
cls = 'ng-app' + (cls||'');
element.addClass(cls);
});
}]
);
Expand Down
6 changes: 6 additions & 0 deletions test/lib/angular/angular-scenario.js
Original file line number Diff line number Diff line change
Expand Up @@ -10367,6 +10367,12 @@ function bootstrap(element, modules) {
scope.$apply(function() {
element.data('$injector', injector);
compile(element)(scope);

// Handle angular-scenario.angularInit() race condition..
// ..when it runs in the future
var cls = ': ' + modules[2] + ';';
cls = 'ng-app' + (cls||'');
element.addClass(cls);
});
}]
);
Expand Down

0 comments on commit 8f3f38d

Please sign in to comment.