Merge branch 'angular.bootstrap' of https://github.com/thorn0/DefinitelyTyped into thorn0-angular.bootstrap

This commit is contained in:
vvakame
2015-10-06 21:25:02 +09:00
2 changed files with 19 additions and 124 deletions
+15
View File
@@ -1041,3 +1041,18 @@ function parseTyping() {
return compiledExp({}, {a: {b: {c: 42}}});
}
}
function doBootstrap(element: Element | JQuery, mode: string): ng.auto.IInjectorService {
if (mode === 'debug') {
return angular.bootstrap(element, ['main', function($provide: ng.auto.IProvideService) {
$provide.decorator('$rootScope', function($delegate: ng.IRootScopeService) {
$delegate['debug'] = true;
});
}, 'debug-helpers'], {
debugInfoEnabled: true
});
}
return angular.bootstrap(element, ['main'], {
debugInfoEnabled: false
});
}