Created
March 14, 2018 11:26
-
-
Save selvagsz/0346eb80758fbacfc41b9fd41a9f78c0 to your computer and use it in GitHub Desktop.
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
export default Ember.Component.extend({ | |
modalPane: injectService(), | |
// 1. | |
delete() { | |
this.get('modalPane').confirm({ | |
header: 'Delete Tab', | |
message: 'Are you sure to delete the tab?' | |
affirm: () => { | |
// handle confirm | |
}, | |
decline: () => { | |
// handle cancel | |
}, | |
}); | |
}, | |
// 2. | |
delete() { | |
this.get('modalPane').confirm({ | |
header: 'Delete Tab', | |
message: 'Are you sure to delete the tab?' | |
}).then(() => { | |
// handle confirm | |
}).catch(() => { | |
// handle cancel | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment