javascript - Angular 2 (click) sometimes does not fire -


in angular 2 / bootstrap / adminlte have following template:

<button type="button" class="btn btn-default"><i class="fa fa-cutlery" (click)='munch(1);'></i></button> 

which calling method:

async munch(amount: number) {     console.log("start")     await this.food.redeem(amount);     console.log("stop") } 

the button embedded in navigation bar. press it, there seems 2/3 random chance fires. however, in 1/3 of cases nothing happens, don't see start on console.

is there might interfere how angular 2 fires these click events? page relatively vanilla, , pretty sure not messing low-level dom / event handling / javascript myself.

could be, i-tag smaller button? why not put (click) inside button instead of tag?


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -