angular/modules/playground/src/sourcemap/index.ts
Paul Gschwendtner e4fb93c28a build: switch playground examples to bazel (#28490)
Currently all playground examples are built with `tsc`
and served with the `gulp serve` task. In order to be able
to test these examples easily with Ivy, we now build and
serve the examples using Bazel. This allows us to expand our
Ivy test coverage and additionally it allows us to move forward
with the overall Bazel migration. Building & serving individual
examples is now very easy and doesn't involve building everything
inside of `/modules`.

PR Close #28490
2019-02-04 16:51:11 -05:00

26 lines
810 B
TypeScript

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {Component, NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
@Component({
selector: 'error-app',
template: `
<button class="errorButton" (click)="createError()">create error</button>`
})
export class ErrorComponent {
createError(): void { throw new Error('Sourcemap test'); }
}
@NgModule({declarations: [ErrorComponent], bootstrap: [ErrorComponent], imports: [BrowserModule]})
export class ExampleModule {
}
platformBrowserDynamic().bootstrapModule(ExampleModule);