Is fixed now in angular 1.3.8. Great.

Am Freitag, 19. Dezember 2014 11:10:04 UTC+1 schrieb Jochen:
>
> since I updated to angular 1.3.7 the ng-repeat | filter functionality 
> seems to be somewhat broken.
> It still works fine with arrays objects that contain at least some 
> non-object properties in the top-level, but breaks when all data is inside 
> nested objects (please see appended plunker code).
> All list are displayed the same before any edit to the nameSerach box, but 
> as soon as the first edit happens, in the Deep case ng-repeat filter does 
> never list any objects again. It looks like the simple string filter does 
> not visit nested objects anymore. Is this intended?
>
>
> Code for plunker:
> <!DOCTYPE html>
> <html>
> <body>
>   <div ng-app="app" ng-controller="test">
>     <div class="form-group">
>       <label for="nameSearch">Search:</label>
>       <input id="nameSearch" data-ng-model="nameSearch">
>     </div>
>     <ul>
>       <li>Flat</li>
>       <li data-ng-repeat="foo in foos | filter: nameSearch">
>         {{foo.foo}}
>       </li>
>     </ul>
>     <ul>
>       <li>Deep</li>
>       <li data-ng-repeat="foo in foosDeep | filter: nameSearch">
>         {{foo.foo.quux}}
>       </li>
>     </ul>
>     <ul>
>       <li>Both</li>
>       <li data-ng-repeat="foo in foosBoth | filter: nameSearch">
>           {{foo.foo.quux}}
>         </li>
>     </ul>
>   </div>
>   <script src="https://code.angularjs.org/1.3.6/angular.js";></script>
>   <script>
>     console.clear();
>     app = angular.module('app', []);
>     app.controller('test', function($scope) {
>      $scope.nameSearch=""
>       $scope.foos = [{foo: "bar"}, {foo:"baz"}];
>       $scope.foosDeep = [{foo: {quux: "bar"}}, {foo: {quux: "baz"}}];
>       $scope.foosBoth = [{foo: {quux: "bar"}, topquux:"x"}, {foo: {quux: 
> "baz"}, topquux:"y"}];
>     });
>   </script>
> </body>
> </html>
>   
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to