mardi 28 février 2017

Ember-boostrap to trigger modal from javascript

From the link here if you scroll down to the example with the button label 'Reopen Modal' They seem to be triggering the modal from javscript. I have tried Ember.$('.modal).modal('show') with no luck, and cant seem to figure out a way to trigger it from js.

My goal is, after a user submits a form and it is successfully validated, the modal appears.

Template


  
  
  



    This is a Modal.


Component

import Ember from 'ember';

export default Ember.Component.extend({
  actions: {
    submit() {
      Ember.$('.modal').modal('show');
    },
  },
});




Aucun commentaire:

Enregistrer un commentaire