Tim Blasi b6507e37ef feat(dart/transform): Use angular2/platform/browser as bootstrap lib
Update the Angular 2 transformer to recognize
`package:angular2/platform/browser.dart` as the library which exports
the `bootstrap` function.

Update playground, examples, benchmarks, & tests to import bootstrap from
platform/browser.

Closes #7647
2016-03-21 00:58:17 +00:00

17 lines
474 B
TypeScript

import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
import {bootstrap} from 'angular2/platform/browser';
import {Component} from 'angular2/core';
@Component({
selector: 'error-app',
template: `
<button class="errorButton" (click)="createError()">create error</button>`
})
export class ErrorComponent {
createError(): void { throw new BaseException('Sourcemap test'); }
}
export function main() {
bootstrap(ErrorComponent);
}