Last active
August 3, 2017 09:36
-
-
Save markleusink/f70f8a845f8d5bd30589dcb7bdbe36de to your computer and use it in GitHub Desktop.
AngularJS-toaster example: hide toaster on close button click, goto different state on body click (and hide toaster)
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
toaster.pop('info', 'Title', '<b>Body text here...</b>', 5000, 'trustedHtml', function callback(toast, isCloseBtn) { | |
if (!isCloseBtn) { | |
//handle the click event here, like going to a different state: | |
$state.go('app.prospects'); | |
} | |
toaster.clear(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment