I am looking for a way to dynamically load a custom component inside a modal while keeping it as flexible as possible.
Here is an example :
-HTML CODE-
<button id="floating_button" class="floating_button animation_floating_in" (click)="loadCustomComponent('new_post_form_modal')"><i class="material-icons">gesture</i></button>
<div class="modal-content" id="loadHere" >
<!-- CUSTOM COMPONENT WILL BE LOADED HERE -->
</div>
-TYPE SCRIPT CODE-
public loadCustomComponent(componentName:any)
{
// Dynamically load componentName inside the div with id="loadHere"
}
Any assistance with this would be greatly appreciated. Thank you!