0

I'm using a toggle in my ionic project, and the generated html of this toggle is :

<div class="item item-toggle toggle-large ng-valid ng-empty" ng-class="checkarrivee.ficheDeMission==undefined ? '' : 'ff'" ng-model="checkarrivee.boo[var.id]" ng-click="checkarrivee.isMissionSelected(var.id,checkarrivee.ficheDeMission.id)" toggle-class="toggle-positive" style=""><div ng-transclude=""><span class="ng-binding">Ceintures De Sécurités Passagères</span></div><label class="toggle toggle-positive disable-user-behavior"><input type="checkbox" ng-model="checkarrivee.boo[var.id]" class="ng-untouched ng-valid ng-dirty ng-empty" value="on"><div class="track"><div class="handle"></div></div></label></div>

what i want is to remove the item from the class because it makes troble for me, i tried to use ng-class but it can only add class over the defined class, so my question in how i can remove the item dynamiclly from the class??

1 Answers1

1

You could just not add it to the class and have it in the ng-class with a condition, to remove just make the condition false.

Or you could use javascript:

Remove CSS class from element with JavaScript (no jQuery)

Community
  • 1
  • 1
R.Villanueva
  • 130
  • 1
  • 5
  • thank you for the answer but , i cant controle the item..it generated by default with ion-toggle –  Oct 25 '16 at 13:10