How to stop page redirection after firebase update


#1

Hi,

Here is my submit function.

Submit(value,imagevalue,event)
  {

    this.platform.ready().then(() => {
              window.plugins.toast.show("Please wait...", "short",'bottom',3000);
        });
    var imagevalue1=imagevalue;
    var Result =  moment().format('YYYY-MM-DD HH:mm:ss');
    this.Editflat.controls['UPDATEDDATE'].setValue(Result); 
    var v=this.Editflat.value;
     this.af.database.list('/flats').update(this.key,v);

}


Here is my code

<form [formGroup]="Editflat"  novalidate>
         <ion-item>
             <ion-label floating>About flat</ion-label>
             <ion-textarea class="textareadesc" elastic formControlName="ABOUT_FLAT">
             </ion-textarea>
        </ion-item>
           <div class="btn"  >
             <button ion-button full type='submit'  (click)="Submit(Editflat,images,$event)">Update</button>
         </div>

    </form> 

I update the data into firebase thereafter page redirect to root page without push.why?

How can i fix this issue?

Kindly advice me,

Thanks.


#2

Hi @anivaishu, did you manage to solve this problem?