Monday, April 1, 2019

When setting the innerHTML property on a div to inject HTML into a component in an Angular 7 application, you will have to utilize the ::ng-deep trick to actually CSS style the injected HTML.

...assuming you want to perhaps nest the HTML for a table inside of a div like so:

this.yin.nativeElement.innerHTML = this.yang;

No comments:

Post a Comment