Opening one modal from another using the meteor way


#1

How exactly do I open one modal from another modal in meteor? I’m using bootstrap-3-modal package

When I try clicking on the confirm button of one modal, it must close that modal and open a new modal. Somehow,it doesn’t seem to work. Here’s what I have:

Template.addMoreTemplateConfirmationModal.events({
    'click #confirmMorePGInstance'(event){ // this is the confirm button on addMoreTemplateConfirmationModal modal 

        Modal.show('createTemplateModal'); // this does not work.
        // Modal.hide('addMoreTemplateConfirmationModal');

    },

#2

Have you tried it with modal events?

Template.modals.onRendered(function(){
  var template = this;
  template.$('#myModal1').on('hidden.bs.modal', function(e){
    template.$('#myModal2').modal('show');
  });
})
Template.modals.events({
  'click button.myModal1': function(e,template) {
    template.$('#myModal1').modal('show');
  }
});