What is proper eventlistener in onsenui when navigating with tab? I have many tabs and subtabs for navigating. So far I use addEventListener "click" to identify which tab I'm now following with tabbar.getActiveTabIndex, while addEventListener "pageinit" is not working when we navigating with tab except with pushPage.
Does onsen has built in eventlistener for this? For swipe I try ons.GestureDetector it listen and running fine, but what about navigating tabs by click?
My code is working right now. I'm just curious, is my code will sacrifice performance? since so many click to listen or is there any alternative?
document.addEventListener("click", function (e) {
if (tabbar.getActiveTabIndex()==1) {
$('#input_id').keyup (function(){
//run code
});
}
},false);