Redefinir senha IONIC4 + FIREBASE

0 respostas
ionic
A

Me ajudem !!

Preciso ajustar a pagina de redifinir senha conforme o form do Firebase, segue abaixo meu codigo.

html

Resetar senha
<ion-content padding>
<button [disabled]=frmResetPassword.invalid class="button is-block is-primary has-text-white is-fullwidth ">

<fa-icon [icon]=faSigninIcon>

Send Request
<strong>MODULE.TS</strong>

import { NgModule } from @angular/core;

import { CommonModule } from @angular/common;

import { FormsModule } from @angular/forms;

import { Routes, RouterModule } from @angular/router;

import { IonicModule } from ‘@ionic/angular’;

import { ResetpasswordPage } from ‘./resetpassword.page’;

const email = this.frmPasswordReset.controls[‘email’].value;

this.afAuth.auth.sendPasswordResetEmail(email).then(

() => {

// success, show some message

},

err => {

// handle errors

}

); [

{

path: ‘’,

component: ResetpasswordPage

}

];
@NgModule({

imports: [

CommonModule,

FormsModule,

IonicModule,

// RouterModule.forChild(routes)

],

declarations: [ResetpasswordPage],

})
export class ResetpasswordPageModule {

}

<strong>PAGE.TS</strong>

import { Component, OnInit } from @angular/core;

import { AngularFireAuth } from @angular/fire/auth;

import { FormBuilder, FormGroup, Validators } from @angular/forms;
@Component({

selector: app-resetpassword,

templateUrl: ./resetpassword.page.html,

styleUrls: [./resetpassword.page.scss],

})

export class ResetpasswordPage implements OnInit {

auth: any;
resetPassword(email: string) {

this.auth.resetPassword(email)

}

constructor(private afAuth: AngularFireAuth, private fb: FormBuilder) {
}

frmPasswordReset: FormGroup = this.fb.group({

email: [null, [Validators.required, Validators.email]]

});

ngOnInit() {
}

}

Criado 23 de outubro de 2019
Respostas 0
Participantes 1