Facing issue with bootstrap popover and tooltip to display the HTML content.
<button type="button" data-bs-toggle="popover" data-bs-html="true" data-bs-content= {{item.HtmlDescription}} title={{item.HtmlDescription}}>
Toggle popover`your text`
</button>
Title property content as mentioned below
<h3>My Community Resident (DCR)</h3>
Looking Criteria for this target group:
<ul>
<li>Age 18 to 39 years old, AND</li>
<li>Resides within one of the country designated:
<ul>
<li>Rural Area, OR</li>
<li>Silent Zone</li>
</ul>
</li>
</ul>
2
Answers
You are creating a
popover
and not atooltip
.You should initialize the popups using this code.
When working with Angular and bootstrap you could try
ng-bootstrap
, which takes away the complexity of using it with angular.TS:
HTML:
Stackblitz Demo
The popover and the tooltip should be a new Popover or a new Tooltip.
If you add "types/boostrap"
You can use a directive in the way
Now you can use
In this stackblitz I use in angular way some diferents components in bootstrap 5 with Angular 18