how to destroy bootstrap modal window completely?

后端 未结 24 863
旧时难觅i
旧时难觅i 2020-11-29 18:51

I\'ve made use of modal window for a wizard implementation which has around 4,5 steps. I need to destroy it completely after the last step(

24条回答
  •  天命终不由人
    2020-11-29 19:20

    With ui-router this may be an option for you. It reloads the controller on close so reinitializes the modal contents before it fires next time.

    $("#myModalId").on('hidden.bs.modal', function () {
      $state.reload();  //resets the modal
    });
    

提交回复
热议问题