Skip to content

Instantly share code, notes, and snippets.

@jdonohoo
Created March 6, 2015 08:50
Show Gist options
  • Select an option

  • Save jdonohoo/656ec025a5e9e83d6290 to your computer and use it in GitHub Desktop.

Select an option

Save jdonohoo/656ec025a5e9e83d6290 to your computer and use it in GitHub Desktop.
Angular Service for Toastr
angular.module('app').value('Toastr', toastr);
angular.module('app').factory('Notifier', function (Toastr) {
return {
notifySuccess: function(msg) {
Toastr.success(msg);
console.log(msg);
},
notifyFailure: function(msg) {
Toastr.error(msg);
console.log(msg);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment