BREAKING CHANGES: Dart applications and TypeScript applications meant to transpile to Dart must now import `package:angular2/bootstrap.dart` instead of `package:angular2/angular2.dart` in their bootstrap code. `package:angular2/angular2.dart` no longer export the bootstrap function. The transformer rewrites imports of `bootstrap.dart` and calls to `bootstrap` to `bootstrap_static.dart` and `bootstrapStatic` respectively.
22 lines
939 B
Dart
22 lines
939 B
Dart
library angular2.application;
|
|
|
|
import 'dart:async';
|
|
|
|
import 'package:angular2/src/reflection/reflection.dart' show reflector;
|
|
import 'package:angular2/src/reflection/reflection_capabilities.dart' show ReflectionCapabilities;
|
|
import 'application_common.dart';
|
|
|
|
export 'application_common.dart' show ApplicationRef;
|
|
|
|
/// Starts an application from a root component. This implementation uses
|
|
/// mirrors. Angular 2 transformer automatically replaces this method with a
|
|
/// static implementation (see `application_static.dart`) that does not use
|
|
/// mirrors and produces a faster and more compact JS code.
|
|
///
|
|
/// See [commonBootstrap] for detailed documentation.
|
|
Future<ApplicationRef> bootstrap(Type appComponentType,
|
|
[List componentInjectableBindings, Function errorReporter]) {
|
|
reflector.reflectionCapabilities = new ReflectionCapabilities();
|
|
return commonBootstrap(appComponentType, componentInjectableBindings, errorReporter);
|
|
}
|