The correct syntax is the following:
<div [innerHTML]="theHtmlString"></div>
Documentation Reference
Related Contents:
- ExpressionChangedAfterItHasBeenCheckedError Explained
- angular2: Error: TypeError: Cannot read property ‘…’ of undefined
- Angular2: Cannot read property ‘name’ of undefined
- NgFor doesn’t update data with Pipe in Angular2
- How can I write data attributes using Angular?
- OrderBy pipe issue
- Angular2 multiple router-outlet in the same template
- Can’t bind to ‘ngForOf’ since it isn’t a known property of ‘tr’ (final release)
- Angular 2 Scroll to top on Route Change
- How to instantiate and apply directives programmatically?
- Angular 2 Dynamically insert a component into a specific DOM node without using ViewContainerRef
- Angular2: How is ngfor expanded
- How to add “class” to host element?
- vs
- Angular2 – Interpolate string with html
- Angular 2 Read More Directive
- Angular 2: How to write a for loop, not a foreach loop
- How to detect scroll to bottom of html element
- Why angular 2 ngOnChanges not responding to input array push
- Is it necessary to unsubscribe from observables created by Http methods?
- Avoiding nesting subscriptions in Angular 2+?
- How to upgrade Angular CLI to the latest version
- How can I use “*ngIf else”?
- How to add CORS request in header in Angular 5
- Ionic 2 – global NavBar for the app
- How to write unit testing for Angular / TypeScript for private methods with Jasmine
- Use component in itself recursively to create a tree
- No ‘Access-Control-Allow-Origin’ header in Angular 2 app
- How to make CORS-enabled HTTP requests in Angular 2?
- Pre-bootstrap loading screen
- Can an ng-content be used inside of an ngFor?
- How can I limit ngFor repeat to some number of items in Angular?
- Property ‘files’ does not exist on type ‘EventTarget’ error in typescript
- Angular 2 filter/search list
- Angular 6 – Could not find module “@angular-devkit/build-angular”
- Angular 2, DomSanitizer, bypassSecurityTrustHtml, SVG
- Angular 2 cache observable http result data [duplicate]
- Compile dynamic HTML in Angular 4/5- something similar to $compile in Angular JS
- Angular 2 Form “Cannot find control with path”
- angular 2 change detection and ChangeDetectionStrategy.OnPush
- Angular2 routing / deep linking not working with Apache 404
- When to use ‘npm start’ and when to use ‘ng serve’?
- Behaviour subject initial value null?
- Multiple conditions in ngClass – Angular 4
- How to cancel/unsubscribe all pending HTTP requests in Angular 4+
- Parameter in to Animation Angular2
- Angular 9 Formarray search operation executing for only first dynamic control
- Angular2 Error: There is no directive with “exportAs” set to “ngForm”
- Pass config data using forRoot
- Angular start ngFor index from 1