From 8a29feb105014a0dedf42039e60c563ee6ba0a06 Mon Sep 17 00:00:00 2001 From: Roman Chygryn <129765378+rmch91@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:43:15 +0200 Subject: [PATCH] fix: change attribute binding to property binding in GenericLink (#17684) Changed attribute binding to property binding for target property in link html element in GenericLinkComponent. In a case of usage of routerLink directive attribute binding of target property might not work as expected. Angular routerLink directive is designed to handle navigation and it takes precedence over the "target" attribute. --- .../shared/components/generic-link/generic-link.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/storefrontlib/shared/components/generic-link/generic-link.component.html b/projects/storefrontlib/shared/components/generic-link/generic-link.component.html index 771d396368e..64725425dfa 100644 --- a/projects/storefrontlib/shared/components/generic-link/generic-link.component.html +++ b/projects/storefrontlib/shared/components/generic-link/generic-link.component.html @@ -19,7 +19,7 @@ [routerLink]="routerUrl" [queryParams]="queryParams" [fragment]="fragment" - [attr.target]="target" + [target]="target || undefined" [attr.id]="id" [attr.class]="class" [attr.style]="style"