Open HamadaRizk opened 7 years ago
@HamadaRizk I'm not sure to understand why you cannot inject the service in another one. I'm using a wrapper around it and it works fine
can you send me a demo please @nadouani
You can find an example here https://plnkr.co/edit/LJhe1FFj1A3ZRv6RDrwg?p=preview
angular.module('NotificationApp', ['ui-notification'])
.factory('CustomNotification', ['Notification', function(Notification){
return {
success: function(message) {
Notification.success(message);
}
};
}])
.controller('MainCtrl', ['Notification', 'CustomNotification', function(Notification, CustomNotification) {
this.showNotification = function() {
Notification.success('Success notification');
};
this.showWrappedNotification = function() {
CustomNotification.success('Custom notification');
};
}]);
the service can not be injected in another custom service