angular.js - angular directive link event binding problem
仅有的幸福
仅有的幸福 2017-05-15 16:57:38
0
1
635

1. Why does setting up to prevent bubbling result in an error


Why do you get an error when setting the third parameter (false, true) when adding event binding? It’s okay if you don’t set it

2. Why is the binding tap event triggered twice?


If you change it to click it will be normal

仅有的幸福
仅有的幸福

reply all(1)
PHPzhong

1 .on( events [, selector ] [, data ], handler )
on ​​method api, the last parameter represents the event callback
The method to prevent bubbling is
2 .on("tap",function(e){ e.stopPropagation();})
3 If you are not using IScroll, it is recommended to use click. If you are using ISroll, configure click:true

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template