Sharing Top Content from the Angular-sphere.

AngularJs filter on nested ng-repeat – Angular.js Recipes – Medium

  • ProblemI have a grouped nested object that I want to filter.
  • The filter works only on the second group.input type=”radio” ng-model=”grouping” value=”name” /Nameinput type=”radio” ng-model=”grouping” value=”date” /Genderinput type=”radio” ng-model=”grouping” value=”jsonpath” /Hairinput type=”text” ng-model=”searchInput” /div data-ng-repeat=”(group, details) in group(reports, grouping) | ul li data-ng-repeat=”report in details | filter:searchInput” {{ report.name }} /li/ul/divHere is the fiddle: have an updated plunker, not sure if…
  • Just remove it.div data-ng-repeat=”(group, details) in group(reports, grouping)”DemoSolution courtesy of: zsongView additional discussion.

“AngularJs filter on nested ng-repeat” is published by Angular.js Recipes

ProblemI have a grouped nested object that I want to filter. The filter works only on the second group.input type=”radio” ng-model=”grouping” value=”name” /Nameinput type=”radio” ng-model=”grouping” value=”date” /Genderinput type=”radio” ng-model=”grouping” value=”jsonpath” /Hairinput type=”text” ng-model=”searchInput” /div data-ng-repeat=”(group, details) in group(reports, grouping) | ul li data-ng-repeat=”report in details | filter:searchInput” {{ report.name }} /li/ul/divHere is the fiddle: have an updated plunker, not sure if i’m on the right direction: courtesy of: TropicalistaSolutionWhat is the purpose to put the filter on the outer repeater? Just remove it.div data-ng-repeat=”(group, details) in group(reports, grouping)”DemoSolution courtesy of: zsongView additional discussion.

AngularJs filter on nested ng-repeat – Angular.js Recipes – Medium

Comments are closed, but trackbacks and pingbacks are open.