Freelance Project Requests info@CodeDocu.de Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net
#

Angular: InnerHTML

 

 

How to create text string to HTML in Angular HTML ?

 

Solution:

 

<div [innerHTML]='article?.htmlcontent'></div>

 

 

 

 

Error if wrong:

compiler.js:2175 Uncaught Error: Template parse errors:

Parser Error: Unexpected token 'is' at column 6 in [this is innerhtml] in ng:///AppModule/ReadArticleComponent.html@17:18 ("

<div [innerHTML]="[ERROR ->]this is innerhtml"></div>

 

 

Wrong:

<div [innerHTML]="this is innerhtml"></div>

 

Wrong:

<div [innerHTML]='{{article?.htmlcontent}}'></div>

 

 

Mobile

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de