Thanks @munsterlander, I’ll try that approach.
Posts made by uhunkler
RE: How to react to the event of ons-list with »tappable« ons-list-items?
How to react to the event of ons-list with »tappable« ons-list-items?
When I have an ons-list with »tappable« ons-list-items how can I react to the event which is sent by the item on tap? I didn’t find an example. Do I need to add »onclick« or can I use an event listener. To what event should that be bound?
Thanks for you answers.
RE: Fill list with new items on button click.
@Fran-Diox Thanks for your answer.
The task is to display the list of paired bluetooth devices. I need to fetch them via the Cordova plugin «cordova-plugin-bluetooth-serial» and show them in a list. And offer a button to refresh the list.
When I read your answer correct, you propose to not use ons-list at all but a normal HTML list. I was hoping to be able to use the ons-list to get a consistent list styling.
Are there classes that I can use with HTML tags to get that same styling as the ons-* tags?
Fill list with new items on button click.
I am doing my fist steps to evaluate Onsen UI 2.0. I want to create mobile interfaces for IoT/robotic projects and look for a convenient environment to create the UI for those projects.
I am not sure if my approach to fill a list with new items on button click is correct. Because I didn’t find an example I tried with
Please have a look at the codepen Onsen UI dynamic list which somehow solves the task.
- Is this the best approach or is there a better way to solve the task?
- How can the template be used for
createItemContent: function(index, template)?
- How can the actual data be integrated into the template?
Thanks a lot for your answers.