import { Component } from '@angular/core'; import { CoreService } from '../../../services/core.service'; import { FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { Router, RouterModule } from '@angular/router'; import { MaterialModule } from '../../../material.module'; import { BrandingComponent } from '../../../layouts/full/vertical/sidebar/branding.component'; @Component({ selector: 'app-side-login', imports: [RouterModule, MaterialModule, FormsModule, ReactiveFormsModule, BrandingComponent], templateUrl: './side-login.component.html' }) export class AppSideLoginComponent { options: any; constructor(private settings: CoreService, private router: Router) { this.options = this.settings.getOptions(); } form = new FormGroup({ uname: new FormControl('', [Validators.required, Validators.minLength(6)]), password: new FormControl('', [Validators.required]), }); get f() { return this.form.controls; } submit() { // console.log(this.form.value); this.router.navigate(['/dashboards/dashboard1']); } }