When I close a bootstrap modal, it doesn't send the action it should (in application js:)
<li><a {{action "showSignInModal"}}>Sign In</a></li>
{{outlet}}
{{outlet 'modal'}}
bootstrap-modal.js:
this.$('.modal').modal().on('hidden.bs.modal', function() {
alert("Closed");
this.sendAction('removeModal');
}.bind(this));
routes/application.js:
export default Ember.Route.extend({
actions: {
showSignInModal: function() {
this.render('components.signin-modal', {
into: 'application',
outlet: 'modal'
});
},
removeModal: function(){
alert("Working")
}
//...
}
})
The "closed" alert shows, but the "working" alert doesn't. (The signin modal is a component, with no actions defined, and is just a bootstrap-modal)
Aucun commentaire:
Enregistrer un commentaire