Last active
August 29, 2015 14:24
-
-
Save KTKate/c6b3a64fe9f95463be2a to your computer and use it in GitHub Desktop.
How to bubble this action
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
{{#detail-area as |goalArea|}} | |
{{#if showForm}} | |
//form stuff | |
<button {{action "save" details target=goalArea}}>Submit</button> | |
{{else}} | |
//other stuff | |
{{/if}} | |
{{/detail-area}} | |
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
//GoalAreaComponent js | |
showForm = false, | |
actions:{ | |
save: function(details){ | |
this.sendAction('save' details); | |
//some logic to return whether it saved | |
this.toggleProperty('showForm'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment