When working with plain javascript, I have the ability to group similar functions into an object called Monolog:
var Monolog = {
notify: function(title, message) {
// Do something with title and message
},
confirm: function(title, message, func) {
// Do something with title, message, and func
}
}
These functions can be accessed like this:
Monolog.notify('Error', 'Error message');
However, when using AngularJS, I need these functions to change a $scope variable. This means I would need to utilize either a service or the rootScope.
What would be the best approach to achieve this in AngularJS?