-export class AccountComponent extends FormReactive implements OnInit {
- error: string = null;
-
- form: FormGroup;
- formErrors = {
- 'new-password': '',
- 'new-confirmed-password': ''
- };
- validationMessages = {
- 'new-password': USER_PASSWORD.MESSAGES,
- 'new-confirmed-password': USER_PASSWORD.MESSAGES
- };
-
- constructor(
- private formBuilder: FormBuilder,
- private router: Router,
- private notificationsService: NotificationsService,
- private userService: UserService
- ) {
- super();
- }
-
- buildForm() {
- this.form = this.formBuilder.group({
- 'new-password': [ '', USER_PASSWORD.VALIDATORS ],
- 'new-confirmed-password': [ '', USER_PASSWORD.VALIDATORS ],
- });
-
- this.form.valueChanges.subscribe(data => this.onValueChanged(data));
- }