im trying to display some rows in array, and filter them by some field.
for example:
i have the array "fieldindex", the fields in the array are:
- fieldname
- pageindex
and the array content is:
[{fieldname:'firstname',pageindex:'1'},{fieldname:'lastname',pageindex:'2'}]
and i have this code:
<input type="text" id="pageindex" />
<span class="fieldindex" ng-repeat="x in fieldsonpdf">
{{x.fieldname}}</span>
and i want the span to display only the fields that the 'pageindex' of them is equel to the input value
for example: if the value of the input is 1, the span display "firstname",
and if the value of the input is 2, the span display "lastname".
thanks for the helpers.