Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49184

Ion-toggle doesn't call ng-change function

$
0
0

@seyid wrote:

Hello everyone, I am switching ion-toggle as shown below.it is calling vatt() function, when I click the toggle's switch button.But when I change it using another button, it is switching toggle's side, but it does not call validate() function.How can I solve this problem?

  <ion-toggle ng-model="p.checked"
                        ng-change="vatt()"
                        class="item item-text-wrap">

                My Toggle
            </ion-toggle>

        <button class="button button-positive" ng-click="check()">Tikla</button>

my controller script has this codes.

  $scope.p=  {id: 1, text: 'USA', checked: false, icon: null} ;
 $scope.check = function () {
  $scope.p.checked = false;

  console.log("asdad");
  }
 $scope.vatt = function () {

  console.log("GORRRRR");
  }

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 49184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>