Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120055865
login.component.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 1, 15:54
Size
618 B
Mime Type
text/x-java
Expires
Thu, Jul 3, 15:54 (2 d)
Engine
blob
Format
Raw Data
Handle
27105908
Attached To
R8244 Eawag_Swing_Weight_Elicitation
login.component.ts
View Options
import { Component } from '@angular/core';
import { AuthenticationService, TokenPayload } from '../authentication.service';
import { Router } from '@angular/router';
@Component({
templateUrl: './login.component.html',
styleUrls: ['./login.component.css']
})
export class LoginComponent {
credentials: TokenPayload = {
email: '',
password: ''
};
constructor(private auth: AuthenticationService, private router: Router) {}
login() {
this.auth.login(this.credentials).subscribe(() => {
this.router.navigateByUrl('/admin');
}, (err) => {
console.error(err);
});
}
}
Event Timeline
Log In to Comment