Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70429

Enable button when toggle is check

$
0
0

@flosrn wrote:

Hello, I want enable register button only when the toglle condition of use is checked like this :

2018-01-13 14_20_13-WebJobbing - Ionic Lab

register.html :

<ion-item class="CGU" no-lines>
     <ion-label class="CGU">I accept the conditions of use</ion-label>
     <ion-toggle color="secondary" [checked]="isToggled" (ionChange)="notify()"></ion-toggle>
</ion-item>

<button ion-button class="login" color="bleu" type="submit" (click)="register()" [disabled]="isToggled != true">Register</button>

register.ts :

public isToggled: boolean = false;

constructor(...) {...}

notify() {
    this.isToggled = !this.isToggled;
  }

But it not working…

Nobody knows how to do it please?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70429

Trending Articles



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