Created
February 4, 2015 22:23
-
-
Save ksykulev/fbda5ea1f9eb87820ccd to your computer and use it in GitHub Desktop.
modal gist
This file contains hidden or 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
//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