-commit
All checks were successful
Build Docker Image / Build Docker Image (push) Successful in 6m18s
All checks were successful
Build Docker Image / Build Docker Image (push) Successful in 6m18s
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
|
||||
import { GeneralService } from '../../services/generalservice';
|
||||
|
||||
@Component({
|
||||
selector: 'app-login-register',
|
||||
@@ -6,6 +8,39 @@ import { Component } from '@angular/core';
|
||||
templateUrl: './login-register.component.html',
|
||||
styleUrl: './login-register.component.css',
|
||||
})
|
||||
export class LoginRegisterComponent {
|
||||
export class LoginRegisterComponent implements OnInit {
|
||||
@Output() registeredEventSubmit = new EventEmitter<any>();
|
||||
registerFrm!: FormGroup;
|
||||
currentStep = 1;
|
||||
|
||||
constructor(){}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.setupFormControl();
|
||||
}
|
||||
|
||||
setupFormControl(): void {
|
||||
this.registerFrm = new FormGroup({
|
||||
username: new FormControl('',[Validators.required, Validators.maxLength(100)]),
|
||||
userlastname: new FormControl('',[Validators.required, Validators.maxLength(100)]),
|
||||
email: new FormControl('',[Validators.required, Validators.email, Validators.maxLength(100)]),
|
||||
password: new FormControl('',[Validators.required, Validators.maxLength(50)]),
|
||||
confirmPassword: new FormControl('',[Validators.required, Validators.maxLength(50)]),
|
||||
terms: new FormControl(false, [Validators.requiredTrue])
|
||||
});
|
||||
}
|
||||
|
||||
onSubmit(){
|
||||
let data = {
|
||||
username: this.registerFrm.get('username')?.value,
|
||||
userlastname: this.registerFrm.get('userlastname')?.value,
|
||||
email: this.registerFrm.get('email')?.value,
|
||||
password: this.registerFrm.get('password')?.value
|
||||
}
|
||||
this.RegisteredEventSubmit(data);
|
||||
}
|
||||
|
||||
RegisteredEventSubmit(event: any){
|
||||
this.registeredEventSubmit.emit(event);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user