1

i want to remove the border around the ionic-toggle

<ion-content  ng-init="checkarrivee.getAllListeCriteres();">
<div class="swipe" on-swipe-left="warn('Must use scope')">Swipe div</div>
<div class="list" style="width: 95%;margin-left: 2%">
  <span us-spinner="{color: 'blue', radius:30, width:8, length: 16}" spinner-key="spinner-0"></span>

  <label class="item item-input item-stacked-label">
    <span class="input-label">Mission en cours :</span>
    <input ion-autocomplete name="vehicule" type="text" readonly="readonly" class="ion-autocomplete"


           items-clicked-method="itemsClicked(callback)"
           items-removed-method="itemsRemoved(callback)"
           placeholder="Séléctionner une mission"
           items-method="getMissionEnCours(query)"
           external-model="initialCountry"
           item-view-value-key="codeDeFicheDeMission"

           items-method-value-key="items"
           max-selected-items="1"
           autocomplete="off"
           ng-model="checkarrivee.ficheDeMission"
           required/>
  </label>
</div>
<ion-list   ng-repeat="(key,value) in checkload | groupBy:'Niveau'">
  <div class="item item-divider" >{{key}}</div>
  <ion-item  on-swipe-left="warn('Must use scope')" ng-repeat="var in value" >


    <ion-toggle ng-model='checkarrivee.boo[var.id]'  ng-click="checkarrivee.isMissionSelected(var.id,checkarrivee.ficheDeMission.id)" toggle-class="toggle-positive">{{var.designation}}</ion-toggle>
    <button  class="button button-clear icon ion-star button-assertive"
            ng-click="toggleStar(var)" ng-show="var.star">
    </button>
    <ion-option-button class="button-dark" >
      <i class="icon ion-star"></i>
    </ion-option-button>
  </ion-item>
</ion-list>

image: enter image description here

potatopeelings
  • 40,709
  • 7
  • 95
  • 119

1 Answers1

2

If you do not want the border to show for the toggle's just add style='border:0;' like this:

<ion-toggle style="border:0;" ng-model='checkarrivee.boo[var.id]'  ng-click="checkarrivee.isMissionSelected(var.id,checkarrivee.ficheDeMission.id)" toggle-class="toggle-positive">{{var.designation}}</ion-toggle> 

But I would suggest not using inline CSS, and instead adding all styling to your css/scss file as it will become much more difficult to maintain as the project scales.

EDIT:

For the CSS it will be something like this .list .item .noToggleBorder{border:0;}

Here's a codepen for you to check it out.

Sam5487
  • 669
  • 1
  • 6
  • 14