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

Ionic 3 click does not trigger the event

$
0
0

@RaisoMos wrote:

Hi,
I’m facing a problem with the click attribute on buttons. When clicking the css changes but it does not fire the event. I really need help

<ion-col col-6>
      <div class="keys" *ngIf="showKeys" [ngClass]="{'closeKeyboard' : closingKeyboard, 'showKeyboard' : showKeys}">
        <div class="keys-content">
          <div class="step-one" [ngClass]="{'outPlease' : outPlease == 1, 'animateRight' : animateRight == 1 && outPlease != 1}">
            <ion-row *ngIf="message">
              <ion-col>
                <h4 class="message">{{message}}</h4>
              </ion-col>
            </ion-row>
            <ion-row class="block preview">
              <ion-col col-8>
                <div class="view" [ngClass]="{'shakeMe': shakeMe}">{{showHiddenPassword()}}</div>
              </ion-col>
              <ion-col col-4>
                <button ion-button full color="dark" (click)="reset()">Effacer</button>
              </ion-col>
            </ion-row>
            <ion-row class="block">
              <ion-col col-4><button ion-button full color="light" class="key-button" (click)="addValue(7)">7</button></ion-col>
              <ion-col col-4><button ion-button full color="light" class="key-button" (click)="addValue(8)">8</button></ion-col>
              <ion-col col-4><button ion-button full color="light" class="key-button" (click)="addValue(9)">9</button></ion-col>
            </ion-row>
            <ion-row class="block">
              <ion-col col-4><button ion-button full color="light" class="key-button" (click)="addValue(4)">4</button></ion-col>
              <ion-col col-4><button ion-button full color="light" class="key-button" (click)="addValue(5)">5</button></ion-col>
              <ion-col col-4><button ion-button full color="light" class="key-button" (click)="addValue(6)">6</button></ion-col>
            </ion-row>
            <ion-row class="block">
              <ion-col col-4><button ion-button full color="light" class="key-button" (click)="addValue(1)">1</button></ion-col>
              <ion-col col-4><button ion-button full color="light" class="key-button" (click)="addValue(2)">2</button></ion-col>
              <ion-col col-4><button ion-button full color="light" class="key-button" (click)="addValue(3)">3</button></ion-col>
            </ion-row>
            <ion-row class="block">
              <ion-col col-4><button ion-button full color="light" class="key-button" (click)="addValue(0)">0</button></ion-col>
              <ion-col col-8><button ion-button full color="secondary" class="key-button" (click)="login()">Valider</button></ion-col>
            </ion-row>
          </div>
        </div>
      </div>
    </ion-col>
addValue(value){
    if(this.resetKeyboard){
      this.value = '';
    }
    this.value += value;
    this.resetKeyboard = false;
  }

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



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