Created
February 1, 2015 12:46
-
-
Save poteto/5db523d436c6aaa3d02e to your computer and use it in GitHub Desktop.
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
actions: { | |
successAction() { | |
Ember.get(this, 'flashes').success('Success!', 2000); | |
}, | |
warningAction() { | |
Ember.get(this, 'flashes').warning('This is a warning message'); // timeout is optional | |
}, | |
infoAction() { | |
Ember.get(this, 'flashes').info('You just did something...', 500); | |
}, | |
dangerAction() { | |
Ember.get(this, 'flashes').danger('So danger'); | |
}, | |
customAction() { | |
Ember.get(this, 'flashes').addMessage('This is a flash with a custom type', 'myCustomType', 3000) | |
}, | |
clearMessages() { | |
Ember.get(this, 'flashes').clear(); // clears all visible flash messages | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment