Skip to content

Instantly share code, notes, and snippets.

@mansona
Created January 20, 2016 22:18
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mansona/f0158e17b913786c5533 to your computer and use it in GitHub Desktop.
Action handler for a "bad" open modal
...
openModal(modal, options) {
var controllerName = options && options.controller || 'modal';
var controller = this.controllerFor(controllerName);
controller.set('content', options && options.data || {});
Ember.run.scheduleOnce('afterRender', this, function() {
this.render(modal, {
into: 'application',
outlet: 'modal',
controller: controllerName
});
});
},
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment