Created
March 6, 2015 08:50
-
-
Save jdonohoo/656ec025a5e9e83d6290 to your computer and use it in GitHub Desktop.
Angular Service for Toastr
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
| 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