0
I’m creating a function but when it’s called it says it hasn’t been defined yet, what would be the reason ?
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
@Component({
selector: 'page-jogomemoria',
templateUrl: 'jogomemoria.html',
})
export class JogomemoriaPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
}
function vira1(){
document.getElementById("vira0").style.zIndex = "999";
}
<ion-header>
</ion-header>
<ion-content padding class="bgcMemoria">
<div class="fase1">
<div class="viradasBaixo">
<img src="assets/img/carta.jpg" id="viradaBaixo1" onclick="vira1()">
</div>
<div class="viradasCima" id="viradasCima">
<img src="assets/img/virada.jpg" id="vira0"></img>
</div>
</div>
</ion-content>
Instead of
onclick=
utilize(click)=
– NoobSaibot