@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