javascript - Create Onsen UI elements dynamically -


is possible create onsen ui elements dynamically using javascript? official documentation says nothing it.

you can create dynamically onsen uui elements using ons._util.createelement() function. takes, in input, html code want generate. example:

var button = ons._util.createelement("<ons-button></ons-button>"); document.body.appendchild(button); 

it create ons-button element, , append body.

edit

you can create in alternative way:

var div = document.createelement('div'); div.innerhtml = '<ons-button></ons-button>' document.body.appendchild(div); 

Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

android - Format a french phone number -