I am developing an ionic app, where I got HTML content from server side, where I have bind this html response to my page view by innerHtml API response, Now I need to change the title anchor URL so that it will open in the app instead of open in the in-app browser. I wrote one directive which reads the entire element by elementRef. But now how to change the click behaviour so that I can put my own code there to open my page.
import { Directive, ElementRef, Renderer } from '@angular/core';
import { Input, Output, EventEmitter } from '@angular/core';
@Directive({
selector: '[stream-link]' // Attribute selector
})
export class StreamLink {
constructor(public element: ElementRef, public renderer: Renderer) {
console.log('Hello StreamLink Directive');
console.log(this.element.nativeElement);
}
}