I'm trying to make a Modal to edit my data, using AngularJS and laravel as backend, but when I call a function in my ng-submit (), it is not invoked.
This is my modal
<div class="modal fade" id="mymodal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form ng-submit="salvar()">
total:<input type="" ng-model="editar.total" name="total">
total:<input type="" ng-model="editar.quantidade_produtos" name="quantidade_produtos">
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" type="submit" class="btn btn-primary">Save changes</button>
</div>
</form>
</div>
</div>
</div>
</div>
And this is my code angularjs
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope, $http) {
$scope.editar = function(data){
$scope.modal = data;
$('#mymodal').modal('show');
}
$scope.salvar = function(){
$scope.editar = {}
$scope.d = $scope.modal.id;
console.log($scope.editar);
}
)};