Guest User

Untitled

a guest
May 25th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import { Component } from '@angular/core';
  2.  
  3. interface LoginForm {
  4. username: string;
  5. password: string;
  6. }
  7.  
  8. @Component({
  9. selector: 'app-form',
  10. template: `
  11. <form>
  12. <input [(ngModel)]="login.username" name="username" />
  13. <input [(ngModel)]="login.password" name="password" />
  14. </form>
  15. `
  16. })
  17. export class FormComponent {
  18. login: LoginForm = {
  19. username: '',
  20. password: ''
  21. };
  22. }
Add Comment
Please, Sign In to add comment