<!DOCTYPE html>
<html lang="es" ng-app="practica">
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="angular.min.js"></script>
<title>Document</title>
</head>
<body>
<input type="text" ng-model="buscar" placeholder="Buscar">
<div ng-controller="ctrldatos">
<table>
<tr>
<th>Sub Categoria Codigo</th>
<th>Sub Categoria Nombre</th>
<th>Sub Categoria</th>
</tr>
<tr ng-repeat="x in names | filter:buscar ">
<td>{{x.subcat_cod}}</td>
<td>{{x.subcat_nom}}</td>
<td>{{x.cat_cod}}</td>
</tr>
</table>
</div>
</body>
<script type="text/javascript">
angular.module("practica",[])
.controller("ctrldatos",function($scope,$http){
$http.get("get.php")
.success(function (response)
{
$scope.names = response;
});
});
</script>
</html>
Como puedo modificar los valores que trae php en formato json usando angular:
<script type="text/javascript">
angular.module("practica",[])
.controller("ctrldatos",function($scope,$http){
$http.get("get.php")
.success(function (response)
{
$scope.names = response;
});
});
</script>
`