mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-04-16 21:35:13 +00:00
64 lines
1.7 KiB
TypeScript
64 lines
1.7 KiB
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
|
|
|
import { FuseConfigService } from '@fuse/services/config.service';
|
|
import { fuseAnimations } from '@fuse/animations';
|
|
|
|
@Component({
|
|
selector : 'lock',
|
|
templateUrl: './lock.component.html',
|
|
styleUrls : ['./lock.component.scss'],
|
|
animations : fuseAnimations
|
|
})
|
|
export class LockComponent implements OnInit
|
|
{
|
|
lockForm: FormGroup;
|
|
|
|
/**
|
|
* Constructor
|
|
*
|
|
* @param {FuseConfigService} _fuseConfigService
|
|
* @param {FormBuilder} _formBuilder
|
|
*/
|
|
constructor(
|
|
private _fuseConfigService: FuseConfigService,
|
|
private _formBuilder: FormBuilder
|
|
)
|
|
{
|
|
// Configure the layout
|
|
this._fuseConfigService.config = {
|
|
layout: {
|
|
navbar : {
|
|
hidden: true
|
|
},
|
|
toolbar: {
|
|
hidden: true
|
|
},
|
|
footer : {
|
|
hidden: true
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------------------------------
|
|
// @ Lifecycle hooks
|
|
// -----------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
* On init
|
|
*/
|
|
ngOnInit(): void
|
|
{
|
|
this.lockForm = this._formBuilder.group({
|
|
username: [
|
|
{
|
|
value : 'Katherine',
|
|
disabled: true
|
|
}, Validators.required
|
|
],
|
|
password: ['', Validators.required]
|
|
});
|
|
}
|
|
}
|