In my app, I have a mechanism that parses the piece of text before rendering and replaces all the links looking text into the actual links. This works great; however, even if I am linking to internal route the app reloads.
Here is one of the examples.
in the template:
<mat-card-title [innerHtml]="resolveTaskDetailsHtml()"></mat-card-title>
Where the resolving function is:
public resolveTaskDetailsHtml() {
return HtmlService.autolinkUrls(escapeHtml(this.details));
}
The outcome of this is the content with replaced url looking strings into actual links. Also, if the link is internal the url is relative to the app. Example:
text http://app.domain/route/123
will be replaced with:
text <a href="/route/123">http://app.domain/route/123</a>
Is it possible to redirect to an internal route with these kinds of generated links? And how?
There is another similar question here Add element with RouterLink dynamically, but it does not look like it was resolved