Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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: ''
- };
- }
Add Comment
Please, Sign In to add comment