-
Notifications
You must be signed in to change notification settings - Fork 0
/
product-details.html
31 lines (31 loc) · 1.02 KB
/
product-details.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
<html>
<head>
<title>Controllers in Ajs handling duplicate data</title>
<style>
img{
margin: 10px;
padding: 5px;
height: 80px;
width: 60px;
border: 1px solid gray;
}
</style>
</head>
<body ng-app="myApp">
<h3>Product Details</h3>
<hr>
<div ng-controller="my">
Product IS : {{prod.pid}}<br>
Product Name : {{prod.pname|uppercase}}<br>
Product Brand : {{prod.brand}}<br>
<img ng-repeat="item in prod.pictures track by $index" src="images/{{item}}">
</div>
<script src="angular.js"></script>
<script>
var app = angular.module("myApp",[]);
app.controller("my",function($scope){
$scope.prod={pid:1107,pname:'Canon Camera px420',brand:'Canon',pictures:['s1.png','s2.jpg','s3.jpg','s13.jpg','s12.jpg']};
})
</script>
</body>
</html>