-
Notifications
You must be signed in to change notification settings - Fork 29
Description
I want to interval 2 seconds before cards adding but set timeout function not proper working in my device. in computer browser the code is running correctly but in android device it stoped when interval is true and donot back to the game start view.....plz help me>??????????
code is here********************************
//when card is empty*********************************************
if (this.cards.length == 0) {
vm.goToAddCard();
}
goToAddCard() {
var vm = this;
this.game_interval = true;
this.game_start = false;
setTimeout(() => {
alert("Done");
vm.game_interval = false;
vm.game_start = true;
console.log("game_start==", vm.game_start);
console.log("game_interval==", vm.game_interval);
vm.addNewCards();
}, 2000);
//html code is here********************