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.
17 lines
430 B
TypeScript
17 lines
430 B
TypeScript
import {BaseException} from 'angular2/src/facade/lang';
|
|
import {bootstrap, Component, View} from 'angular2/bootstrap';
|
|
|
|
@Component({
|
|
selector: 'error-app',
|
|
})
|
|
@View({
|
|
template: `
|
|
<button class="errorButton" (click)="createError()">create error</button>`
|
|
})
|
|
export class ErrorComponent {
|
|
createError(): void { throw new BaseException('Sourcemap test'); }
|
|
}
|
|
|
|
export function main() {
|
|
bootstrap(ErrorComponent);
|
|
}
|