// Code goes here
var app = angular.module('myApp', ['ui.filters']);
app.controller('MainController', function ($scope) {
$scope.name = "hello";
$scope.data = [{
featured: "0",
exclusive: "0",
promo_id: "P59802",
offer_id: "2239",
offer_name: "Zotezo.com CPS - India",
coupon_title: "Zotezo Crazy4",
category: "Home & Kitchen",
coupon_description: "TnC: [Free Shipping] [COD not available]",
coupon_type: "Promotion",
coupon_code: "",
ref_id: "utm_source=vCommission&utm_medium=CPS&utm_content=Deals-of-the-Day&utm_campaign=vCommission",
link: "http://tracking.vcommission.com/aff_c?offer_id=2239&aff_id=48766&url=http%3A%2F%2Fwww.zotezo.com%2Feveryday-wellness%3Futm_source%3DvCommission%26utm_medium%3DCPS%26utm_content%3DDeals-of-the-Day%26utm_campaign%3DvCommission",
coupon_expiry: "2017-01-31",
added: "2017-01-05",
preview_url: "http://www.zotezo.com/everyday-wellness",
store_link: "http://tracking.vcommission.com/aff_c?offer_id=2239&aff_id=48766",
store_image: "http://media.vcommission.com/brand/files/vcm/2239/zottezo-1.jpg"
},
{
featured: "0",
exclusive: "0",
promo_id: "P59802",
offer_id: "2239",
offer_name: "Zotezo.com CPS - India",
coupon_title: "Zotezo Crazy4",
category: "Home & Kitchen",
coupon_description: "TnC: [Free Shipping] [COD not available]",
coupon_type: "Promotion",
coupon_code: "",
ref_id: "utm_source=vCommission&utm_medium=CPS&utm_content=Deals-of-the-Day&utm_campaign=vCommission",
link: "http://tracking.vcommission.com/aff_c?offer_id=2239&aff_id=48766&url=http%3A%2F%2Fwww.zotezo.com%2Feveryday-wellness%3Futm_source%3DvCommission%26utm_medium%3DCPS%26utm_content%3DDeals-of-the-Day%26utm_campaign%3DvCommission",
coupon_expiry: "2017-01-31",
added: "2017-01-05",
preview_url: "http://www.zotezo.com/everyday-wellness",
store_link: "http://tracking.vcommission.com/aff_c?offer_id=2239&aff_id=48766",
store_image: "http://media.vcommission.com/brand/files/vcm/2239/zottezo-2.jpg"
},
{
featured: "0",
exclusive: "0",
promo_id: "P59802",
offer_id: "2239",
offer_name: "Zotezo.com CPS - India",
coupon_title: "Zotezo Crazy4",
category: "Home & Kitchen",
coupon_description: "TnC: [Free Shipping] [COD not available]",
coupon_type: "Promotion",
coupon_code: "",
ref_id: "utm_source=vCommission&utm_medium=CPS&utm_content=Deals-of-the-Day&utm_campaign=vCommission",
link: "http://tracking.vcommission.com/aff_c?offer_id=2239&aff_id=48766&url=http%3A%2F%2Fwww.zotezo.com%2Feveryday-wellness%3Futm_source%3DvCommission%26utm_medium%3DCPS%26utm_content%3DDeals-of-the-Day%26utm_campaign%3DvCommission",
coupon_expiry: "2017-01-31",
added: "2017-01-05",
preview_url: "http://www.zotezo.com/everyday-wellness",
store_link: "http://tracking.vcommission.com/aff_c?offer_id=2239&aff_id=48766",
store_image: "http://media.vcommission.com/brand/files/vcm/2239/zottezo-2.jpg"
},
{
featured: "0",
exclusive: "0",
promo_id: "P59802",
offer_id: "2239",
offer_name: "Zotezo.com CPS - India",
coupon_title: "Zotezo Crazy4",
category: "Home & Kitchen",
coupon_description: "TnC: [Free Shipping] [COD not available]",
coupon_type: "Promotion",
coupon_code: "",
ref_id: "utm_source=vCommission&utm_medium=CPS&utm_content=Deals-of-the-Day&utm_campaign=vCommission",
link: "http://tracking.vcommission.com/aff_c?offer_id=2239&aff_id=48766&url=http%3A%2F%2Fwww.zotezo.com%2Feveryday-wellness%3Futm_source%3DvCommission%26utm_medium%3DCPS%26utm_content%3DDeals-of-the-Day%26utm_campaign%3DvCommission",
coupon_expiry: "2017-01-31",
added: "2017-01-05",
preview_url: "http://www.zotezo.com/everyday-wellness",
store_link: "http://tracking.vcommission.com/aff_c?offer_id=2239&aff_id=48766",
store_image: "http://media.vcommission.com/brand/files/vcm/2239/zottezo-2.jpg"
}
];
});
<!DOCTYPE html>
<html>
<head>
<link data-require="[email protected]" data-semver="3.3.7" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<link rel="stylesheet" href="style.css" />
</head>
<body ng-app="myApp">
<div class="container" ng-controller="MainController">
<table>
<tr>
<th>Brand</th>
<th>Deals</th>
</tr>
<tr class="list card" ng-repeat="da in data | unique: 'store_image'">
<td> <img class="thumbnail center-block img-responsive " ng-src="{{ da.store_image }}" />{{da.category}}</td>
<td></td>
</tr>
</table>
</div>
<script data-require="[email protected]" data-semver="2.2.4" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script data-require="[email protected]" data-semver="1.5.7" src="https://code.angularjs.org/1.5.7/angular.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui/0.4.0/angular-ui.js"></script>
<script data-require="[email protected]" data-semver="3.3.7" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="script.js"></script>
</body>
</html>
実施例でありますか? –
画像を確認してください –
私は 'my.json'ファイルの内容を意味します。 –