This change adds a syntax for bootstrapping Angular on a page that allows more fine-grained control of the hierarchy created. platform() creates a platform injector (of which there can only be one). From the platform, .application() creates an Angular application including a Zone and all specified application bindings (e.g. for the DOM, HTTP, Compiler, Renderer, etc). At the application level, .bootstrap() will bootstrap the given component into that application. Closes #3852
17 lines
558 B
Dart
17 lines
558 B
Dart
library angular2.src.core.application_static;
|
|
|
|
import 'dart:async';
|
|
import 'application_common.dart';
|
|
import 'package:angular2/src/core/compiler/dynamic_component_loader.dart' show ComponentRef;
|
|
|
|
/// Starts an application from a root component.
|
|
///
|
|
/// See [commonBootstrap] for detailed documentation.
|
|
Future<ComponentRef> bootstrapStatic(Type appComponentType,
|
|
[List componentInjectableBindings, void initReflector()]) {
|
|
if (initReflector != null) {
|
|
initReflector();
|
|
}
|
|
return commonBootstrap(appComponentType, componentInjectableBindings);
|
|
}
|