javascript - Ionic add tap/click event dynamically -


i have div added dynamically javascript framework. after done, want add ionic click/tap handler specific div. how can achieve this?

<ul ng-click=function(){}>     <my_generated_div></my_generated_div> </ul> 

you can add event listener using id or class:

document.getelementbyid("yourdivid").addeventlistener("click", function(){    //your code }); 

or if have reference of object:

yourobjectreference.addeventlistener("click", function(){    //your code }); 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -