0

I want to change the select to toggle style in ionic 1. The problem is I do not know how to let the toggle to select Yes or No. Two things I need

  1. The toggle yes and no selection must work the same as select which currently working

  2. I need to show the 'Yes' and 'No' on the toggle. The preset of the toggle is 'No'

abc.html

  <div class="row">
    <div class="col col-33">Baby</div>
    <div class="col col-66">
      <select ng-model="searchQuery.stockBaby" ng-init="searchQuery.stockBaby = '%'">
        <option value="%">Yes</option>
        <option value="S">No</option>
      </select>
    </div>
  </div>

<ion-toggle ion-toggle-text ng-model="searchQuery.stockBaby" ng-init="searchQuery.stockBaby = '%'">
    <div class="col col-33">Baby</div>
    <div class="col col-66">
  </ion-toggle>

Current view of select and toggle. Select is working but toggle not Current select and toggle. It does not work anyway. Also, I need the word in the toggle

enter image description here

bkcollection
  • 913
  • 1
  • 12
  • 35
  • Possible duplicate of [How can I place text inside an ion-toggle](http://stackoverflow.com/questions/29280945/how-can-i-place-text-inside-an-ion-toggle) – Vahid Najafi Mar 25 '17 at 14:55
  • @vahidnajafi, I also have issue to convert select to toggle. Not duplicate if you read clearly – bkcollection Mar 25 '17 at 15:05

0 Answers0