From ea3374c16b7868e6a3211e7d2dd3ed102af26cea Mon Sep 17 00:00:00 2001 From: Matthieu Riegler Date: Wed, 2 Nov 2022 14:20:56 +0100 Subject: [PATCH] refactor(router): Simplify routerLink selector (#47941) Since the merge of `RouterLinkWithHref` into `RouterLink` there is no need for a complex selector. PR Close #47941 --- goldens/public-api/router/index.md | 2 +- packages/router/src/directives/router_link.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/goldens/public-api/router/index.md b/goldens/public-api/router/index.md index 6c1976b26d6..83749ad7eef 100644 --- a/goldens/public-api/router/index.md +++ b/goldens/public-api/router/index.md @@ -743,7 +743,7 @@ class RouterLink implements OnChanges, OnDestroy { // (undocumented) get urlTree(): UrlTree | null; // (undocumented) - static ɵdir: i0.ɵɵDirectiveDeclaration; + static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) static ɵfac: i0.ɵɵFactoryDeclaration; } diff --git a/packages/router/src/directives/router_link.ts b/packages/router/src/directives/router_link.ts index 7c63c49a248..5fb80cb66af 100644 --- a/packages/router/src/directives/router_link.ts +++ b/packages/router/src/directives/router_link.ts @@ -116,7 +116,7 @@ import {UrlTree} from '../url_tree'; * @publicApi */ @Directive({ - selector: ':not(a):not(area)[routerLink],a[routerLink],area[routerLink]', + selector: '[routerLink]', standalone: true, }) export class RouterLink implements OnChanges, OnDestroy {