AngularJS wrapper for Bootbox.js. Bootbox.js allowes you to easily make use of Twitter Bootstrap modals for javascript alerts, confirms and prompts. ngBootbox includes three directives, one for each of alert, confirm and prompt.
<button class="btn btn-default" ng-bootbox-alert="Alert message!"> Alert </button>
<button class="btn btn-lg btn-primary" ng-bootbox-confirm="Are you sure you want to confirm this?" ng-bootbox-confirm-action="confirmCallbackMethod(attr1, attr2)" ng-bootbox-confirm-action-cancel="confirmCallbackCancel(attr1, attr2)"> Confirm </button>
<button class="btn btn-lg btn-primary" ng-bootbox-prompt="Please type in your name" ng-bootbox-prompt-action="promptCallback(result)" ng-bootbox-prompt-action-cancel="promptCallbackCancelled(result)"> Prompt </button>
<button class="btn btn-lg btn-primary" ng-bootbox-title="A cool title!" ng-bootbox-custom-dialog="Some custom text" ng-bootbox-buttons="customDialogButtons"> Custom dialog </button>
$scope.customDialogButtons = { warning: { label: "Warning!", className: "btn-warning", callback: function() { ... } }, success: { label: "Success!", className: "btn-success", callback: function() { ... } }, danger: { label: "Danger!", className: "btn-danger", callback: function() { ... } }, main: { label: "Click ME!", className: "btn-primary", callback: function() { ... } } };
<button class="btn btn-lg btn-primary" ng-bootbox-title="A cool title!" ng-bootbox-custom-dialog ng-bootbox-custom-dialog-template="custom-dialog.tpl.html" ng-bootbox-buttons="customDialogButtons"> Custom dialog with template </button>