Skip to content

Instantly share code, notes, and snippets.

@markleusink
Last active August 3, 2017 09:36
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 markleusink/f70f8a845f8d5bd30589dcb7bdbe36de to your computer and use it in GitHub Desktop.
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)
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