
form.html
忘记密码
form.ts
@Component({
moduleId: module.id,
selector: 'my-password',
templateUrl: 'password.html',
providers:[ForService]
})
export class PasswordComponent {
constructor(
private ForService:ForService,
private route: ActivatedRoute,
private router: Router,
) {}
public name1:string='';
public name2:string='';
public sgin='';
public errMessage:string;
sendEmail (email:string) {
if (!email) { return; }
this.ForService.finder(email)
.subscribe(
res => {this.sgin=res['status']; let stu = this.sgin ;if(stu=="00"){ this.router.navigate(['/linkReset',email]);}},
error => this.errMessage = error);
console.log(this.sgin);
}
}
请求大神,怎么写法?
提交之后,并显示“该邮箱并未注册”?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
给你个链接 http://www.jianshu.com/p/22e0...
Angular是以数据来驱动DOM的,所以当 http 请求返回邮箱未注册时,你可以加:
模板: