Add ngModel to switch demo

This commit is contained in:
Max Lynch
2015-10-12 14:51:12 -05:00
parent b824883ade
commit 4758b9ae30
2 changed files with 7 additions and 0 deletions

View File

@ -25,6 +25,8 @@ class IonicApp {
this.grapeDisabled = true;
this.grapeChecked = true;
this.myModel = true;
}
toggleGrapeChecked() {

View File

@ -28,6 +28,10 @@
Secondary color
</ion-switch>
<ion-switch value="apple" checked="true" [(ng-model)]="myModel">
I'm an NgModel
</ion-switch>
</ion-list>
</form>
@ -47,6 +51,7 @@
<code>cherry.value: {{fruitsForm.controls.cherryCtrl.value}}</code><br>
<code>grape.dirty: {{fruitsForm.controls.grapeCtrl.dirty}}</code><br>
<code>grape.value: {{fruitsForm.controls.grapeCtrl.value}}</code><br>
<code>ngModel.value: {{myModel}}</code><br>
</p>
<pre aria-hidden="true" padding>{{formResults}}</pre>