I am using ionic 1 to set the toggle preset to search for “%” from SQL. The preset is off. If off, search “%” and on search “S”. It works if I switch the toggle to on and then off again. If I use the preset which is off, I unable to search.

This is my current code. I need it to set preset also able to search

<ion-toggle toggle-class="toggle-positive" ng-model="myToggle" ng-change="searchQuery.alldata = (myToggle ? 'S' : '%')">
          <div class="row">
          <div class="col col-40">My data</div>
          <div class="col col-60">

Ion-toggle issue