app .factory('$e5aBootbox', function ($ngBootbox) { $ngBootbox.removeConfirm = function (options) { if (angular.isString(options)) { options = {message: options}; } var defaults = { className: "modal-danger", message: "Czy na pewno usunąć?", title: 'Potwierdź operację usuwania', buttons: { confirm: { label: "Usuń", className: "btn-danger" } } }; options = angular.extend({}, defaults, options); return $ngBootbox.confirm(options); }; return $ngBootbox; });