Error - $ dialogs.confirm

0

I have a problem with using $ angular dialog, before it was working normally, and then started to appear the error below:

angular.min.js:118 TypeError: $dialogs.confirm is not a function
at m.$scope.deleteCapacity (capacityCtrl.js:77)

Controller:

  $scope.deleteCapacity = function(capacity) {
    var dlg = $dialogs.confirm("Confirma a exclusão?", "Você deseja excluir a capacitação " + capacity.nameCapacity + " ?");
    dlg.result.then(function(btn) {
        capacityService.removeCapacity(capacity.idCapacity, function(data) {
            $scope.capacities = capacityService.getCapacity();
        });
    }, function(btn) {
    });
    $scope.capacities = capacityService.getCapacity();
};

Index:

<script type="text/javascript" src="js/libs/angular.min.js"></script>
<script type="text/javascript" src="js/libs/angular-ui-router.min.js"></script>
<script type="text/javascript" src="js/libs/angular-resource.min.js"></script>
<script type="text/javascript" src="js/libs/angular-sanitize.js"></script>
<script type="text/javascript" src="js/libs/ui-bootstrap-custom.js"></script>
<script type="text/javascript" src="js/libs/jquery.js"></script>
<script type="text/javascript" src="js/libs/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/libs/dialogs.js"></script>
<script type="text/javascript" src="js/services/capacityService.js"></script>
<script type="text/javascript" src="js/controllers/capacityCtrl.js"></script>
<script type="text/javascript" src="js/config/routers.js"></script>
<script type="text/javascript" src="js/config/app.js"></script>
    
asked by anonymous 31.10.2016 / 14:14

0 answers