28 lines
810 B
TypeScript
28 lines
810 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { FormGroup, FormBuilder, Validators } from '@angular/forms'
|
|
|
|
@Component({
|
|
selector: 'app-register',
|
|
templateUrl: './register.component.html',
|
|
styleUrls: ['./register.component.scss']
|
|
})
|
|
export class RegisterComponent implements OnInit {
|
|
|
|
constructor(
|
|
private formBuilder: FormBuilder
|
|
) { }
|
|
|
|
loginForm: FormGroup = this.formBuilder.group({
|
|
'userName': ['', [Validators.required, Validators.minLength(6), Validators.maxLength(15)]],
|
|
'password': ['', [Validators.required, Validators.minLength(6), Validators.maxLength(15)]],
|
|
'confirmPassword': ['', [Validators.required, Validators.minLength(6), Validators.maxLength(15)]],
|
|
})
|
|
|
|
ngOnInit() {
|
|
}
|
|
|
|
_submit() {
|
|
alert('=====')
|
|
}
|
|
}
|