Hey so I need to populate my select box with a list of Regions from Json object. There are duplicates in here that I would like to remove and I have set the alphabetical order.
I also need to use track by job.WS_REGION so that the value is set to the region just now I think it is tracking index so assigning a number to the value.
Can track by be used in conjunction with filters?
They work perfect independent of each other either by assigning value or applying filters.
<select ng-model="filterzz" ng-options="job.WS_REGION for job in jobsfull track by job.WS_REGION | orderBy: 'WS_REGION' | unique:'WS_REGION'">
If this is a simple mistake go easy on me its a Friday afternoon :)
Hey so I need to populate my select box with a list of Regions from Json object. There are duplicates in here that I would like to remove and I have set the alphabetical order.
I also need to use track by job.WS_REGION so that the value is set to the region just now I think it is tracking index so assigning a number to the value.
Can track by be used in conjunction with filters?
They work perfect independent of each other either by assigning value or applying filters.
<select ng-model="filterzz" ng-options="job.WS_REGION for job in jobsfull track by job.WS_REGION | orderBy: 'WS_REGION' | unique:'WS_REGION'">
If this is a simple mistake go easy on me its a Friday afternoon :)
Share Improve this question asked Sep 12, 2014 at 14:05 craigie2204craigie2204 3613 silver badges13 bronze badges1 Answer
Reset to default 21Try parentheses:
ng-options="job.WS_REGION for job in (jobsfull | orderBy: 'WS_REGION' | unique:'WS_REGION') track by job.WS_REGION"