I am working on an mobile application using Ionic2 and Angular2. I have an API that return json array of strings like below:
{
"Go to page <a (click)='redirectToAPage(1)'> something </a>",
"Go to page <a (click)='redirectToAPage(2)'> something else </a>",
"Go to page <a (click)='redirectToAPage(3)'> something else </a>"
}
When I run *ngFor over this array and I use
<p [innerHTML]="item"></p>
It prints the data well, but it removes (click) event. After passing it through a DomSanitizer Pipe with bypassSecurityTrustHtml function it ignores the event too.
Can anyone help please?