ionic2 tap vs click

前端 未结 6 1916
隐瞒了意图╮
隐瞒了意图╮ 2020-12-09 17:02

I am starting with angular2 and ionic2;

In ionic2, I have a button that will call a method of my component. Like this:

6条回答
  •  臣服心动
    2020-12-09 17:30

    In addition to the top voted question I'd like to point out that (tap) processes $event differently when used as a parameter. If I remember correctly, when using (tap) the target attribute in $event will be the element you actually tapped on, not the element that has the (tap) event binding. This would be relevant if you have child elements inside your element with (tap) bound to it.

提交回复
热议问题