Skip to content

Instantly share code, notes, and snippets.

@ksykulev
Created February 4, 2015 22:23
Show Gist options
  • Save ksykulev/fbda5ea1f9eb87820ccd to your computer and use it in GitHub Desktop.
Save ksykulev/fbda5ea1f9eb87820ccd to your computer and use it in GitHub Desktop.
modal gist
//routes/ppm
export default Ember.Route.extend({
actions: {
openModal: function() {
this.render('ingredientSelect', {
into: 'ppm',
outlet: 'modal'
});
},
closeModal: function() {
this.disconnectOutlet({
parentView: 'ppm',
outlet: 'modal'
});
}
}
});
//templates/ppm.hbs
<div>
...
</div>
{{outlet "modal"}}
//controllers/ingredient-select.js
export default Ember.Controller.extend({
actions: {
submit: function() {
//validate and submit stuff
}
}
});
//templates/ingredient-select.hbs
<div class="modal">
...
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment