Answers for "data dismiss modal with id"

-2

data-dismiss= modal in jquery

$(document).ready(function(){
        // Open modal on page load
        $("#myModal").modal('show');
 
        // Close modal on button click
        $(".btn").click(function(){
            $("#myModal").modal('hide');
        });
    });
Posted by: Guest on August-29-2020
2

modal controller get data on dismiss

selectUser(user: User):void {
  this.modalController.dismiss(user);
}
...
async openUserModal() {
    const modal = await this.modalCtrl.create({
      component: UserModalComponent,
      componentProps: { users: this.users },
    });

    modal.onDidDismiss()
      .then((data) => {
        const user = data['data']; // Here's your selected user!
    });

    return await modal.present();
}
Posted by: Guest on November-29-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language