Skip to content

Instantly share code, notes, and snippets.

@shreyanshdwivedi
Created June 18, 2019 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shreyanshdwivedi/b33c2de56456ad0962e41f25efa0163d to your computer and use it in GitHub Desktop.
Save shreyanshdwivedi/b33c2de56456ad0962e41f25efa0163d to your computer and use it in GitHub Desktop.
Open Event: Triggers the action to open delete-user-modal
{{!-- app/templates/components/account/danger-zone.hbs --}}
<button {{action 'openDeleteUserModal' data.user.id data.user.email}} class='ui red button'>
{{t 'Delete Your Account'}}
</button>
// app/components/account/danger-zone.js
openDeleteUserModal(id, email) {
this.setProperties({
'isUserDeleteModalOpen' : true,
'confirmEmail' : '',
'userEmail' : email,
'userId' : id
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment