I'm new to Angular and I would like to add dynamic content to my view. I referred here but $compile is no longer available in Angular latest it seems.
e.g. the following is my dynamic content in a string (htmlStr).
ngAfterViewInit(){
let htmlStr = "<nb-actions size=\"small\"><nb-action icon=\"save-outline\" (click)=\"onEdit\" nbTooltip=\"Click to update a 'Company Type'.'\" nbTooltipPlacement=\"right\"></nb-action> </nb-actions>"
$("#myelement").append(htmlStr);
}
How do I compile the above string so that it will be rendered properly? I also have access to JQuery on my component if that helps! I'm aware of Html binding but it doesn't help in my case.
Any help would be much appreciated here!