I'm using AngularJS to filter the results of a wine's list. The wines are categorized by colors (red, white, rose, champagne), and other parameters (countries).
When one color is checked with the check-box (red for example), a
filtered list of red wine appears. But when two colors are selected, no
results appears (red and white for example). Same problems if a check France and Italie both.
my wishes:
here the code example:
<div ng-controller="MainCtrl">
<input ng-model="characteristics.red" type="checkbox" >red</input>
<input ng-model="characteristics.white" type="checkbox" >white</input>
<input ng-model="characteristics.rose" type="checkbox" >rose</input>
<input ng-model="characteristics.champagne" type="checkbox" >champagne</input>
<br><br>
<input ng-model="characteristics.leger" type="checkbox" >leger</input>
<input ng-model="characteristics.fort" type="checkbox" >fort</input>
<br><br>
<input ng-model="characteristics.france" type="checkbox" >france</input>
<input ng-model="characteristics.italie" type="checkbox" >italie</input>
<br><br>
<div ng-repeat="wine in filtered= (wines |filteredstoves:characteristics) | filteredstoves:characteristics">
{{wine.name}} - {{wine.characteristics}}
</div>
<br><br>
Filtered list has {{filtered.length}} items
</div>
Demo of the code: http://jsfiddle.net/stefanos/kTYdd/31/
it sounds very hard to code, i tried during hours without results
regards,
Stéphane
--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/l18du7c6z4w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.