javascript - Bootstrap modal with AngularJS -
i want output message when click button. wants saved. how create modal.
<input type="submit" class="btn btn-primary" value="remove verify" ng-show="isverifypage" ng-click="save()">
js file
$scope.save = function() { //connect backend }).success(function(data, status) { alert('successfully saved'); }) .error(function(error) { console.log($scope.status); }); }
my must inject controller sweetalert. , when want make alert use in example.
nameyoucontroller.$inject = ['$scope','sweetalert']; function nameyoucontroller( $scope, sweetalert) { $scope.save = function() { //connect backend }).success(function(data, status) { return sweetalert.swal('successfully saved'); }).error(function(error) { console.log($scope.status); }); }
Comments
Post a Comment