update change password
This commit is contained in:
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, FormControl, Validators } from '@angular/forms'
|
||||
import { CustomValidators } from '../utils/custom-validators';
|
||||
import { NzMessageService } from 'ng-zorro-antd';
|
||||
import { Router, ActivatedRoute } from '@angular/router'
|
||||
import { HttpClientService } from '../services/http-client.service';
|
||||
|
||||
@Component({
|
||||
@@ -17,6 +18,8 @@ export class ChpwComponent implements OnInit {
|
||||
constructor(
|
||||
private formBuilder: FormBuilder,
|
||||
private message: NzMessageService,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private httpClient: HttpClientService) { }
|
||||
|
||||
ngOnInit() {
|
||||
@@ -94,6 +97,7 @@ export class ChpwComponent implements OnInit {
|
||||
this.chpwForm.controls[i].markAsUntouched();
|
||||
this.chpwForm.controls[i].updateValueAndValidity();
|
||||
}
|
||||
this.router.navigate(['../app/main'], { relativeTo: this.route });
|
||||
} else {
|
||||
this.message.error(response.err_msg + ',修改失败!');
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgZorroAntdModule } from 'ng-zorro-antd';
|
||||
import { NgZorroAntdModule, } from 'ng-zorro-antd';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
|
||||
import { ChpwRoutingModule } from './chpw-routing.module'
|
||||
import { ChpwComponent } from './chpw.component';
|
||||
|
||||
Reference in New Issue
Block a user