I have this printValue variable with a HTML button code inside my angular component like so:
export class HomeComponent implements OnInit {
printValue = '<button type="button" data-toggle="popover" title="Popover Header" data-content="Some content inside the popover">Popover</button>';
constructor(){}
OnInit(){}
}
The question is, how do i make the popover work once the printValue variable has been placed inside the innerHTML as seen below:
<p [innerHTML]="printValue"></p>
Doing this
<body>
<button type="button" data-toggle="popover" title="Popover Header" data-content="Some content inside the popover">Popover</button>
</body>
inside an html file directly will enable popovers to work. But how to make it to work inside a innerHTML attribute?