mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(toggle): fix ngChange being reported before model changes
Closes #1349, #1741 BREAKING CHANGE: ion-toggle no longer has an isolate scope. This will break your toggle only if you were relying upon the toggle having an isolate scope: if you were referencing `$parent.value` as the ng-disabled attribute, for example. Change your code from this: <ion-toggle ng-disabled="{{$parent.isDisabled}}"></ion-toggle> To this: <ion-toggle ng-disabled="{{isDisabled}}"></ion-toggle>
This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
<div ng-controller="TestCtrl">
|
||||
|
||||
<div class="list">
|
||||
<ion-toggle ng-model="checkModel2" ng-change="myChange = checkModel2">
|
||||
Main Check
|
||||
</ion-toggle>
|
||||
<ion-checkbox ng-model="checkModel" ng-change="myChange = checkModel">
|
||||
Main Check
|
||||
</ion-checkbox>
|
||||
|
||||
Reference in New Issue
Block a user