mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-04-12 03:21:37 +00:00
60 lines
1.7 KiB
TypeScript
60 lines
1.7 KiB
TypeScript
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
|
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
|
import { fuseAnimations } from '@fuse/animations';
|
|
import { FuseAlertType } from '@fuse/components/alert';
|
|
import { AuthService } from 'app/core/auth/auth.service';
|
|
|
|
@Component({
|
|
selector : 'sign-in-classic',
|
|
templateUrl : './sign-in.component.html',
|
|
encapsulation: ViewEncapsulation.None,
|
|
animations : fuseAnimations
|
|
})
|
|
export class SignInClassicComponent implements OnInit
|
|
{
|
|
alert: { type: FuseAlertType; message: string } = {
|
|
type : 'success',
|
|
message: ''
|
|
};
|
|
signInForm: UntypedFormGroup;
|
|
showAlert: boolean = false;
|
|
|
|
/**
|
|
* Constructor
|
|
*/
|
|
constructor(
|
|
private _authService: AuthService,
|
|
private _formBuilder: UntypedFormBuilder
|
|
)
|
|
{
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------------------------------
|
|
// @ Lifecycle hooks
|
|
// -----------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
* On init
|
|
*/
|
|
ngOnInit(): void
|
|
{
|
|
// Create the form
|
|
this.signInForm = this._formBuilder.group({
|
|
email : ['', [Validators.required, Validators.email]],
|
|
password : ['', Validators.required],
|
|
rememberMe: ['']
|
|
});
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------------------------------
|
|
// @ Public methods
|
|
// -----------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
* Sign in
|
|
*/
|
|
signIn(): void
|
|
{
|
|
}
|
|
}
|