javascript - Angularjs issue with ng-click on mobile -
i've got big performance issue.
i'm in ng-repeat block (and i'm using track id improve performances). in block i'm generating next dom:
1)button1a button1b 2)button2a button2b 3)button3a button3b 4)button4a button4b 5)button5a button5b 6)button6a button6b
there ng-show , ng-disabled in page, on variable set ng-click on buttons.
performances poor. on mobile using ng-mobile and\or fastclick 300ms delay removing, seems tooks lot of time "update variables , dom" after clicking on button.
how can improve performances?
thanks lot!
edit: here code:
<div class="row" ng-repeat="date in dateranges track date.value"> <div ng-show="!date.custom" class="col-xs-14 col-sm-15 date-filter no-rel"> <div class="button-container button-radio"><button data-ng-class="{'radiob disabled': getdate() != date,'radiob active': getdate() == date}" ng-click="setdate(date)"></button></div> <div class="button-container button-text"> <button class="select-date" ng-click="setdate(date)">{{date.title}} {{date.nodetails ? '' : date.start | date:'dd/mm/yyyy'}} {{date.nodetails ? '' : '-'}} {{date.nodetails ? '' : date.end | date:'dd/mm/yyyy'}}</button> </div> </div> <div ng-if="date.custom" class="col-xs-2 col-sm-1 date-filter"> <button data-ng-class="{'radiob disabled':getdate() != date,'radiob active':getdate() == date}" ng-click="setdate(date)"></button> </div> <div ng-if="date.custom" class="col-xs-14 col-sm-15 date-filter no-rel"> <div class="row" data-ng-class="{'has-error': haserrorcomune && criteriricerca_daterange.custom}"> </div> <div class="col-md-16 mrg-t-10 text-center"> <button id="undo" ng-click="undo()" class="btn btn-esci mrg-r-10">undo</button> <button type="submit" id="dropdownmovimenticonferma" ng-click="operation()" data-ng-disabled="criteriricerca_daterange.custom && (haserrorcomune || haserrorstart || haserrorend)" class="btn btn-primary">ok</button> </div>
you're testing on real mobile (harware) or emulator?
if on real, check task manager , cpu utilization.
javascript jquery angularjs mobile angularjs-ng-click
No comments:
Post a Comment