Wasim
Wasim

Reputation: 724

How to display text Bold in Angular 8

C#

  FormName = $"<b>{x.FormName}</b>  {Environment.NewLine + x.Path}"

Angular 8 HTML

  <div [innerText]="right.formName"></div>

It looks like this

enter image description here

But I want it to look like this , I want to make heading BOLD but I used above approach and its not working

GIS Admin

/user-management/gis-admin

Upvotes: 0

Views: 509

Answers (1)

Florencia Cames
Florencia Cames

Reputation: 359

It should be:

<div [innerHTML]="right.formName"></div>

Is a property binding that will render HTML AN example here:

https://www.digitalocean.com/community/tutorials/angular-innerhtml-binding-angular

Upvotes: 3

Related Questions