Hi all I have recently upgraded to Angular 1.2.9 from 1.0.8 to make us of track by' which has really improved performance.
So previously I had <div class="result row" data-ng-repeat="result in (filteredItems = (results | filter:filterPrice | filter:filterCategories | filter:filterTypes | filter:filterAirConditioning | filter: filterTransmission | filter: filterFourByFour | filter:filterFuelType | filter: filterNumberOfDoors | filter: filterOnAirport | filter: filterFuelPolicy | filter: filterUnlimitedMileage | filter: filterFreeCancellation | filter: filterTheftProtection | filter: filterCDW | filter: filterTaxesIncluded | filter: filterProviders)) | orderBy: [orderByOptions, orderByPriceLowToHigh, orderByPriority] | startFrom:currentPage*pageSize | limitTo:pageSize"> I now have <div class="result row" data-ng-repeat="result in results | filter:filterPrice | filter:filterCarCategories | filter:filterCarTypes | filter:filterAirConditioning | filter: filterTransmission | filter: filterFourByFour | filter:filterFuelType | filter: filterNumberOfDoors | filter: filterOnAirport | filter: filterFuelPolicy | filter: filterUnlimitedMileage | filter: filterFreeCancellation | filter: filterTheftProtection | filter: filterCDW | filter: filterTaxesIncluded | filter: filterProviders | orderBy: [orderByOptions, orderByPriceLowToHigh, orderByPriority] | startFrom:currentPage*pageSize | limitTo:pageSize track by $index"> Angular didn't like having the filteredItems array has it had this error Error: [ngRepeat:dupes] Which of course 'track by' fixes. However to get it to work I've had to remove the filteredItems. When I use the filters I need to know how many items are left showing so I can display it in the HTML and also update the paging in the JavaScript. So what to do? The performance is excellent with track by. -- 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/groups/opt_out.
