angular2-swing
angular2-swing copied to clipboard
timeout
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********************
Hello, Not sure if this is still an issue, can you please create a plunkr to demo this?