Last active
August 29, 2015 13:57
-
-
Save JFickel/9923899 to your computer and use it in GitHub Desktop.
EmberJS Bootstrap Modal Question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I'm using a cookbook recipe from http://emberjs.com/guides/cookbook/user_interface_and_interaction/using_modal_dialogs/ | |
// I've got this action in my Ember.ApplicationRoute: | |
openModal: function() { | |
this.render("processing", { | |
into: 'application', | |
outlet: 'modal' | |
}); | |
} | |
// When I call #send on this from a controller, the "processing" template renders as expected. | |
// However, if I try placing my modal templates inside a subdirectory, the template is rendered, but | |
// the bootstrap javascript that controls the modal fails and doesn't display. | |
// I'm guessing that there's some context switching that happens when a template is rendered in a subdirectory | |
// that screws up bootstrap's javascript. I'm not sure if this is a problem in Ember or Bootstrap. | |
// where modalName == "modals/processing" | |
// Ember.keys(Ember.TEMPLATES) includes "modals/processing" | |
openModal: function(modalName) { | |
this.render(modalName, { | |
into: 'application', | |
outlet: 'modal' | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment