I have a list of products generated from a third party JSON feed, the prices will vary depending on the current price from the 3rd party.
How can I only display prices on the page below for a certain value, such as below £10.00?
I assume AngularJS filters will come into play here but now sure how it works with an expression such as item.products_price, but even better if a slider or something is also possible. So products are displayed below based on the value range in a slider.
Here is my 'List' code:
<!DOCTYPE html>
<html ng-app="plunker">
<head>
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<script>
document.write('<base href="' + document.location + '" />');
</script>
<link rel="stylesheet" href="style.css" />
<script data-require="angular.js@1.4.x" src="https://code.angularjs.org/1.4.9/angular.js" data-semver="1.4.9"></script>
<script src="app.js"></script>
</head>
<ion-content class="has-subheader">
<ion-list>
<ion-item ng-repeat="item in products | filter:query" class="item-thumbnail-left item-text-wrap">
<img ng-src="img/{{item.products_image}}" alt="{{item.products_name}} Photo">
<h2>{{item.products_name}}</h2>
<h3>{{item.products_model}}</h3>
<p>{{item.products_price}}</p>
</ion-item>
</ion-list>
</ion-content>
</html>