-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (50 loc) · 1.71 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE>
<html ng-app="landing" ng-controller="productosCtrl">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
</head>
<body>
<table class="table table-striped">
<thead>
<tr>
<th>idProducto</th>
<th>nombre</th>
<th>precio</th>
<th>stock</th>
<th>oferta</th>
<th>imagen</th>
<th>id categoria</th>
<th>categoria</th>
<th>precio de venta</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="x in productos">
<td>{{ x.id }}</td>
<td>{{ x.nombre }}</td>
<td>{{ x.precio }}</td>
<td>{{ x.stock }}</td>
<td>{{ x.oferta }}</td>
<td><img src="../landingfrontend/images/{{x.imagen}}" height="200" width="200"></td>
<td>{{ x.idcategoria }}</td>
<td>{{ x.categoria }}</td>
<td>{{ x.preciod }}</td>
</tr>
</tbody>
</table>
</div>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" integrity="sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" crossorigin="anonymous"></script>
<script>
var app = angular.module('landing', []);
app.controller('productosCtrl', function($scope, $http) {
$http.get("php/getproductos.php")
.success(function (response) {$scope.productos = response.productos;});
});
</script>
</body>
</html>