Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 679 Bytes

README.md

File metadata and controls

33 lines (25 loc) · 679 Bytes

angular-bootbox

makeusabrew/bootbox (https://github.com/makeusabrew/bootbox) to AngularJS

Scripts

<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/bootbox.js/4.2.0/bootbox.js"></script>
<script src="scripts/angular-bootbox.js"></script>

App

var app = angular.module('YourApp', ['angular-bootbox']);
app.config(function ($bootboxProvider) {
  $bootboxProvider.setDefaults({ locale: "es" });
});

Controller

app.controller('eventsController', ['$scope', 'bootbox', function ($scope, bootbox) {
  bootbox.confirm("Are you sure?", function (result) {
      return true;
  });
}]);