Reputation: 887
I am trying to apply the Angular Dart tutorial (Recipe Book app) to a real project of mine. Everything is working fine, except the basic filtering on a name. The code is almost identical to the tutorial:
<div id="filters">
<div>
<label for="name-filter">Filter clients by name</label>
<input id="name-filter" type="text"
ng-model="ctrl.nameFilterString">
</div>
<input type="button" value="Clear Filters" ng-click="ctrl.clearFilters()">
<ul class="list-group">
<li class="list-group-item"
ng-repeat="client in ctrl.clients | filter:{en_name:ctrl.nameFilterString}"
ng-click="ctrl.selectClient(client)">
{{ client.en_name }} ({{ client.acronym }})
</li>
But the list is not displayed at all. If I remove | filter:{en_name:ctrl.nameFilterString}
, the list of clients is properly displayed. orderBy: 'en_name'
works fine too. The string is defined in my controller, and the "clearFilters()" function works fine.
Any idea what I am doing wrong? Thanks!
Upvotes: 2
Views: 228
Reputation: 2495
This is a bug and is being tracked at https://github.com/angular/angular.dart/issues/800
Upvotes: 0
Reputation: 657008
Seems to be a problem with the used Angular version 0.9.9.
I tried it with 0.9.10 and it works.
Downgrading to 0.9.9 resulted ng-repeate
producing no output.
Upvotes: 3