mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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.
13 lines
560 B
TypeScript
13 lines
560 B
TypeScript
import {HelloCmp} from './index_common';
|
|
import {bootstrap} from 'angular2/bootstrap';
|
|
|
|
export function main() {
|
|
// Bootstrapping only requires specifying a root component.
|
|
// The boundary between the Angular application and the rest of the page is
|
|
// the shadowDom of this root component.
|
|
// The selector of the component passed in is used to find where to insert the
|
|
// application.
|
|
// You can use the light dom of the <hello-app> tag as temporary content (for
|
|
// example 'Loading...') before the application is ready.
|
|
bootstrap(HelloCmp);
|
|
}
|