In my continued attempts at getting really silly and trying to do things I probably shouldn’t, I pose this question.
I want to do something to the effect of:
this.listOfThings.push({ id: 1, name: 'boo' });
let container = document.getElementById('container0');
container.innerHTML = "<div id.bind='thing.id' repeat.for='thing of listOfThings'>${thing.name}</div>"
I know this doesn’t work, but is there a concept I’m overlooking that will allow me to do something like this or is this a dead end?
I know compose or a custom element will allow it, but I’m looking for the freedom of defining the element inline, as shown, but still reaping the benefits of having the templating engine taking care of managing the items dynamically as they are added or removed from the collection the element’s repeat is bound to.
Enhance is especially powerful when working in CMS environments or generally when html is dynamically placed e.g via DB queries or often also jquery plugins such as GoldenLayout. I’m using that for the Webtestit IDE, where every panel is a dedicated enhanced view