I am stuck at something similar. I want to bind the html data to the dynamically created node.
I am using code:
$scope.addtab = function () {
tabs.addLast(‘Sample title’,loadPage(‘TOSview.html’,tabs.val()));
tabs.ensureVisible(-1);
};
var loadPage = function (url, tabIndex) {
$.get(url, function (data) {
console.log(data);
// dynamically appends data returned from a server to a content element with ID equal to “content1”
// for the first tab, “content2” for the second tab or “content3” for the third tab.
// $(‘#content’ + tabIndex).html(data);
$(‘#Sample title’).html(data);
});
}
But, its not working.. I see undefined in the content section. My url is only fetching <h1>Hello world</h1>