forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapplication.ts
More file actions
29 lines (27 loc) · 1009 Bytes
/
application.ts
File metadata and controls
29 lines (27 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Public API for Application
import {Binding} from './di';
import {Type, isPresent} from 'angular2/src/core/facade/lang';
import {Promise} from 'angular2/src/core/facade/async';
import {compilerBindings} from 'angular2/src/core/compiler/compiler';
import {commonBootstrap} from './application_common';
import {ComponentRef} from './linker/dynamic_component_loader';
export {APP_COMPONENT, APP_ID} from './application_tokens';
export {platform} from './application_common';
export {
PlatformRef,
ApplicationRef,
applicationCommonBindings,
createNgZone,
platformCommon,
platformBindings
} from './application_ref';
/// See [commonBootstrap] for detailed documentation.
export function bootstrap(appComponentType: /*Type*/ any,
appBindings: Array<Type | Binding | any[]> = null):
Promise<ComponentRef> {
var bindings = [compilerBindings()];
if (isPresent(appBindings)) {
bindings.push(appBindings);
}
return commonBootstrap(appComponentType, bindings);
}