I have a <div> with contenteditable=true and I'd like to use components inside this div to give some of the contents specific behaviors. Essentially these components are <span>s with some data binding and css styling.
I need to be able to create these components, at any location within the div, based on server and user activity. I can't just put the <my-component....> tag in the innerHTML. I've looked at DynamicComponentLoader which *almost* looks like it will do the right thing, but it needs a template variable to mark the spot to place the component. But I can't find a way to insert a template variable, either. Putting <span #marker></span> in the innterHTML doesn't work.
My next step is to start looking at the TemplateCompiler, but I'm starting to feel like I'm fighting Angular instead of leveraging it.
Is there a pattern for how code can easily insert Angular components into the DOM, dynamically at runtime?