mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
15 lines
418 B
TypeScript
15 lines
418 B
TypeScript
|
|
import {Component, NgModule} from '@angular/core';
|
|
|
|
@Component({
|
|
selector: 'hello-world-app',
|
|
template: `
|
|
<div>Hello {{ name }}!</div>
|
|
<input type="text" [value]="name" (input)="name = $event.target.value"/>
|
|
`,
|
|
// TODO: might be better to point to .scss so this looks valid at design-time
|
|
styleUrls: ['./hello-world.component.css'],
|
|
})
|
|
export class HelloWorldComponent {
|
|
name: string = 'world';
|
|
}
|