2015-09-03 22:01:36 -07:00
|
|
|
// Public API for Application
|
2015-10-01 10:07:49 -07:00
|
|
|
import {Binding} from './di';
|
|
|
|
import {Type, isPresent} from 'angular2/src/core/facade/lang';
|
|
|
|
import {Promise} from 'angular2/src/core/facade/async';
|
2015-10-02 07:57:29 -07:00
|
|
|
import {compilerBindings} from 'angular2/src/core/compiler/compiler';
|
2015-10-01 10:07:49 -07:00
|
|
|
import {commonBootstrap} from './application_common';
|
2015-10-02 07:37:23 -07:00
|
|
|
import {ComponentRef} from './linker/dynamic_component_loader';
|
2015-10-01 10:07:49 -07:00
|
|
|
|
2015-10-02 09:53:57 -07:00
|
|
|
export {APP_COMPONENT, APP_ID} from './application_tokens';
|
2015-10-01 10:07:49 -07:00
|
|
|
export {platform} from './application_common';
|
2015-09-21 16:48:16 -07:00
|
|
|
export {
|
|
|
|
PlatformRef,
|
|
|
|
ApplicationRef,
|
|
|
|
applicationCommonBindings,
|
|
|
|
createNgZone,
|
|
|
|
platformCommon,
|
|
|
|
platformBindings
|
|
|
|
} from './application_ref';
|
2015-10-01 10:07:49 -07:00
|
|
|
|
|
|
|
/// 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);
|
2015-10-02 07:37:23 -07:00
|
|
|
}
|