I am studying AngularJS and I was able to create a table receiving the MySQL database data.
Now I need to learn how to edit the data. I was able to put a modal and clicking the edit button opens, but I do not know how to pull the data.
demoApp.js:
(function () {
'use strict';
angular.module('myApp', ['ui.bootstrap', 'dataGrid', 'pagination', 'angular-loading-bar', 'ngAnimate'])
.controller('myAppController', ['$scope', '$http', function ($scope, $http) {
$scope.gridOptions = {
data: [],
urlSync: true,
pagination: {
itemsPerPage: '10'
}
};
$http({
method: 'GET',
url: 'get_reparaveis.php'
}).then(function successCallback(response) {
$scope.gridOptions.data = response.data;
});
}]);
})();
Here I call the modal, but how do I get the ng-click
to get the log data on the line?
<button class="btn btn-warning" data-toggle="modal" data-target="#edit_pn" ng-click=""><span class="glyphicon glyphicon-edit"></span></button>