diff options
| author | crupest <crupest@outlook.com> | 2019-03-04 16:30:44 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2019-03-04 16:30:44 +0800 |
| commit | 0073d146e8d9dab4ad87c0c782dbbfb26378a3b2 (patch) | |
| tree | fbab7724759fad1b81cca4b8042d6d45fd55e3bd /Timeline/ClientApp/src/app/user-login/user-login.component.ts | |
| parent | 2f9e5f37c1a7237b45caf57c2606a07fd52955c9 (diff) | |
| download | timeline-0073d146e8d9dab4ad87c0c782dbbfb26378a3b2.tar.gz timeline-0073d146e8d9dab4ad87c0c782dbbfb26378a3b2.tar.bz2 timeline-0073d146e8d9dab4ad87c0c782dbbfb26378a3b2.zip | |
Develop some basic parts of auth.
Diffstat (limited to 'Timeline/ClientApp/src/app/user-login/user-login.component.ts')
| -rw-r--r-- | Timeline/ClientApp/src/app/user-login/user-login.component.ts | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Timeline/ClientApp/src/app/user-login/user-login.component.ts b/Timeline/ClientApp/src/app/user-login/user-login.component.ts new file mode 100644 index 00000000..072f04af --- /dev/null +++ b/Timeline/ClientApp/src/app/user-login/user-login.component.ts @@ -0,0 +1,27 @@ +import { Component, Output, OnInit, EventEmitter } from '@angular/core'; +import { FormGroup, FormControl } from '@angular/forms'; + +export class LoginEvent { + username: string; + password: string; +} + +@Component({ + selector: 'app-user-login', + templateUrl: './user-login.component.html', + styleUrls: ['./user-login.component.css'] +}) +export class UserLoginComponent { + + @Output() + login = new EventEmitter<LoginEvent>(); + + form = new FormGroup({ + username: new FormControl(''), + password: new FormControl('') + }); + + onLoginButtonClick() { + this.login.emit(this.form.value); + } +} |
