代码:
reset(){
let alert = this.AlertCtrl.create({
buttons :['ok']
});
this.userservice.passwordreset(this.email).then((res: any)=>{
if(res.success){
alert.setTitle('Email sent');
alert.setSubTitle('please follow the instructions in the email to reset the password')
}
else{
alert.setTitle('failed');
}
})
}
Run Code Online (Sandbox Code Playgroud)
错误:
属性然后在类型 void 上不存在,打字稿错误
有人可以通过更正此代码片段来帮助我,以便“then”功能正常工作!