The correct syntax is the following:
<div [innerHTML]="theHtmlString"></div>
More 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?
- Angular2 multiple router-outlet in the same template
- OrderBy pipe issue
- Angular 2 Scroll to top on Route Change
- Can’t bind to ‘ngForOf’ since it isn’t a known property of ‘tr’ (final release)
- How to instantiate and apply directives programmatically?
- Angular 2 Read More Directive
- Angular2: How is ngfor expanded
- How to add “class” to host element?
- vs
- Angular2 – Interpolate string with html
- Angular 2 Dynamically insert a component into a specific DOM node without using ViewContainerRef
- Angular 2 input parameters on root directive [duplicate]
- What is let-* in Angular 2 templates?
- How to truncate text in Angular2?
- Angular 2: How to write a for loop, not a foreach loop
- How to detect scroll to bottom of html element
- How to check the length of an Observable array
- How can I use ngFor to iterate over Typescript Enum as an array of strings
- Angular 2 disable sanitize
- Why angular 2 ngOnChanges not responding to input array push
- Get angular-cli to ng serve over HTTPS
- To enable or disable the input field based on the value of select component in angular
- How to solve the circular dependency
- How to mock Angular 4.3 httpClient an error response in testing
- Angular 6 – how to mock router.events url response in unit test