Created
May 21, 2018 12:28
-
-
Save realtomaszkula/4705ba854ef6a3efafa13f970c966251 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
interface LoginForm { | |
username: string; | |
password: string; | |
} | |
@Component({ | |
selector: 'app-form', | |
template: ` | |
<form> | |
<input [(ngModel)]="login.username" name="username" /> | |
<input [(ngModel)]="login.password" name="password" /> | |
</form> | |
` | |
}) | |
export class FormComponent { | |
login: LoginForm = { | |
username: '', | |
password: '' | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment