我有一个包含多个锚点标签的表格。我想在单击每个锚点标签时动态创建外部URL。我尝试使用[routerLink],但它会附加基本URL。是否有任何Angular的方法来实现?非常感谢您的帮助。
HTML
HTML
<ng-container matColumnDef="invoiceNo">
<mat-header-cell *matHeaderCellDef > Invoice # </mat-header-cell>
<mat-cell *matCellDef="let invoice">
<a [routerLink]="getInvoiceUrl()" target="_blank">
{{invoice.invoiceNumber}}
</a>
</mat-cell>
</ng-container>
ts
getInvoiceUrl(){
return "www.google.com";
}