-
-
Save mansona/f0158e17b913786c5533 to your computer and use it in GitHub Desktop.
Action handler for a "bad" open modal
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
... | |
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