Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import {Component} from '@angular/core';
@Component({
moduleId:module.id,
selector:'my-app',
template:`
<div class="container">
<input [value]="name" (input)="name=$event.target.value" />
<br/>
<h1>Hello {{name}}</h1>
</div>
`
})
export class AppComponent{
name : string = "";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment