angularjs - how to stop click event on ion-item for conditional items ionic -


i trying disable click on ion-item items. code this

<ion-item class="item (app.app_id==='isdivider')?'item-divider':'' no-border padding-20-10"         collection-repeat="app in apps"         item-width="(app.app_id==='isdivider')?5000:90"         item-height="(app.app_id==='isdivider')?70:105"         ng-click="(app.app_id==='isdivider')||listdetailsofapps();item.clicked = true"         stop-event="click"> 

it not calling if app.app_id isdivider still clickable.

how make not clickable header , should not clickable

put inside $scope function in controller detect , run other actions clickable item:

controller:

$scope.clickcheck = function(app){     if(app.app_id==='isdivider'){         //action divider. (should nothing)     }else{         //action clickable item. (set item.clicked=true)     } } 

view :

repeat item inside <div> tag , using ng-if:

<div collection-repeat="app in apps">     <ion-item ng-if="app.app_id==='isdivider'" class="item-divider no-border padding-20-10"         item-width="5000"         item-height="70">     <ion-item ng-if="app.app_id!=='isdivider'" class="no-border padding-20-10"         collection-repeat="app in apps"         item-width="90"         item-height="105"         ng-click="item.clicked=true"> </div> 

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -