var ApplicationRoute = Ember.Route.extend({ actions: { openModal: function (modalName, model) { modalName = 'modals/' + modalName; // We don't always require a modal to have a controller // so we're skipping asserting if one exists if (this.controllerFor(modalName, true)) { this.controllerFor(modalName).set('model', model); } return this.render(modalName, { into: 'application', outlet: 'modal' }); }, closeModal: function () { return this.disconnectOutlet({ outlet: 'modal', parentView: 'application' }); } } }); export default ApplicationRoute;