Following the advice in several forum posts, along with this jsbin created by Alexander Valchev, I am investigating the use of an observable object that provides HTML content to be rendered:
jsbin.com/iyakig/2/edit
If I add a second button to the code in the jsbin like this:
makeButton: function () {
var html = '<a data-role="button" data-bind="click: makeListView">Replace again</a><a data-role="button" data-bind="click: makeListView">Replace yet again</a>';
this.set("foo", html);
},
The second button does not get initialized as a widget as you can see here:
jsbin.com/iyakig/31/edit
Is there a limitation on MVVM binding of HTML code?
We have been using kendo.mobile.init() to initialize all widgets in the HTML generated by a template, but we are looking to use MVVM binding as suggested in this post. We would be very interested in knowing why additional widgets are not initialized as well as the advantages to this approach vs. the kendo.mobile.init() approach.
jsbin.com/iyakig/2/edit
If I add a second button to the code in the jsbin like this:
makeButton: function () {
var html = '<a data-role="button" data-bind="click: makeListView">Replace again</a><a data-role="button" data-bind="click: makeListView">Replace yet again</a>';
this.set("foo", html);
},
The second button does not get initialized as a widget as you can see here:
jsbin.com/iyakig/31/edit
Is there a limitation on MVVM binding of HTML code?
We have been using kendo.mobile.init() to initialize all widgets in the HTML generated by a template, but we are looking to use MVVM binding as suggested in this post. We would be very interested in knowing why additional widgets are not initialized as well as the advantages to this approach vs. the kendo.mobile.init() approach.