My solution is simple. I am using [href] instead of [routerLink]. I have tried all solutions for [routerLink]. None of them works in my case.
Here is my solution:
<a [href]="getPlanUrl()" target="_blank">My Plan Name</a>
Then write the getPlanUrl
function in the TS file.