Skip to content

Instantly share code, notes, and snippets.

@JFickel
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JFickel/9923899 to your computer and use it in GitHub Desktop.
Save JFickel/9923899 to your computer and use it in GitHub Desktop.
EmberJS Bootstrap Modal Question
// 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