angular/modules/playground/src/zippy_component/index.ts
Joey Perrott f9781f9804 refactor: migrate modules to prettier formatting (#53954)
Migrate formatting to prettier for modules directory from clang-format

PR Close #53954
2024-01-17 09:41:59 -08:00

37 lines
959 B
TypeScript

/**
* @license
* Copyright Google LLC 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';
import {Zippy} from './app/zippy';
@Component({
selector: 'zippy-app',
template: `
<zippy (open)="pushLog('open')" (close)="pushLog('close')" title="Details">
This is some content.
</zippy>
<ul>
<li *ngFor="let log of logs">{{ log }}</li>
</ul>
`,
})
export class ZippyApp {
logs: string[] = [];
pushLog(log: string) {
this.logs.push(log);
}
}
@NgModule({declarations: [ZippyApp, Zippy], bootstrap: [ZippyApp], imports: [BrowserModule]})
export class ExampleModule {}
platformBrowserDynamic().bootstrapModule(ExampleModule);