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:
Andrew
2014-07-10 23:48:15 -06:00
parent 3dea57d8fb
commit 537b29d0bb
4 changed files with 40 additions and 35 deletions

View File

@@ -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>