RouterLink has not(a) selector but it works on <a> tags

This issue has been created since 2022-09-22.

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

No

Description

Both the documentation and router/src/directives/router_link.ts show:

  selector: ':not(a):not(area)[routerLink]',

However demos in documentation (and so far popular practice) has been using it on anchors like

<a [routerLink]="['/user/bob']" [queryParams]="{debug: true}" queryParamsHandling="merge">

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

No response

Anything else?

No response

tomasdev wrote this answer on 2022-09-22

Not to confuse RouterLink with RouterLinkWithHref

More Details About Repo
Owner Name angular
Repo Name angular
Full Name angular/angular
Language TypeScript
Created Date 2014-09-18
Updated Date 2022-10-04
Star Count 84139
Watcher Count 3064
Fork Count 22243
Issue Count 1206

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Bought Silvercrest IP CAM S-K 1920 Version 1.1.1.13 Model WAPP-JS (LIDL) MCU Version Z1709250 58 2019-05-07 2022-10-03
Issue on the dtrajs_concatenated 1 2021-03-27 2022-08-28
[BUG] Broken link to Enigmatics Finder project 2 2022-04-20 2022-10-01
Allow comments in `banlist.txt` 0 2022-06-21 2022-09-12
Replace substitute package 1 2019-10-13 2022-09-27
Generate an SEO inner link when we don't need it 1 2022-07-14 2022-09-27
Get rid of unmaintained substitute dependency 0 2021-12-18 2022-09-27
Make index.html optional 3 2015-11-03 2022-09-27
Reason behind setImmediate(done)? 3 2015-11-18 2022-09-27
Allow Processing Before Metalsmith-In-Place 7 2019-02-15 2022-09-27
"µ" should not appear in a url 3 2019-05-10 2022-09-27
When initializing :chrome browser with :url specified, the default download directory is not set properly 4 2018-11-02 2022-07-03
Update scratch org JSON configuration files 1 2020-05-20 2022-08-28
Modifying SIM_ARGS in the Makefile does not update runsim.do 6 2022-03-08 2022-10-01
Update on 5.1.1 - No Scripts displayed 11 2021-03-22 2022-09-12
ZUGFeRDInvoiceImporter liest keine ZUGFeRD 1 Dateien 1 2022-09-21 2022-09-19
XRechnung Skonto-Unterstützung 4 2022-09-19 2022-09-19
Nullpointer Exception import zugferd 3 2022-09-13 2022-09-19
[html] 第991天 如何将Canvas绘制过程转为视频? 0 2021-12-31 2022-09-29
filmy.work/filmyhit.wine/fimymeet.co ads 0 2022-03-25 2022-09-18
Add support for rounded borders 0 2022-02-23 2022-10-03
Improve the default search by sorting 1 2021-11-01 2022-09-19
macos config dir issue 4 2021-06-05 2022-09-18
MacOS environment installation error (xhost: command not found) 3 2021-07-14 2022-08-20
No sound is played on vrcall1.arbor3d.cn 0 2021-11-29 2022-08-16
django-cors-headers==2.5.3 works with or without scheme aware origins 2 2021-01-23 2022-09-11
SQLWATCH-INTERNAL-CONFIG failed on step 9 5 2021-05-11 2022-10-04
chess|move|d2d4|23926 1 2022-07-27 2022-07-22
chess|move|a4a5|23926 1 2022-07-27 2022-09-18
chess|move|a2a4|23926 1 2022-07-27 2022-07-22
chess|move|d7d5|23926 1 2022-07-27 2022-09-03
nightly agent install error 3 2022-03-15 2022-09-16
Issue setting up in AAD Integration 1 2022-01-28 2022-10-03
Watta heck: postinstall script fails?! 4 2022-07-19 2022-09-25
Grad-CAM - Which layer to choose? 0 2022-08-24 2022-10-04
BUG: inplace behavior changes after 1.4.x 3 2022-04-19 2022-10-02
[TRACKER] VFX workflow issues 0 2022-08-01 2022-08-09
error: expected type expression, found '.' 2 2022-03-20 2022-09-16
[BUG] Toggle can't handle ref and needs key to be rendered correctly 0 2022-04-20 2022-10-04
Packr does not work with spring-boot fatjar 4 2017-12-13 2022-09-23
http-proxy-server 0 2021-05-13 2022-01-23
GTK fails to initialize 3 2021-02-10 2022-09-28
Wiki: Table Per Type, EF core 2 2022-09-02 2022-09-26
improve page insights valuation on pagespeed 1 2019-12-14 2022-08-27
[Package Request]: Elgato Stream Deck v. 5.1.2.14743 0 2021-11-12 2022-09-26
fix python vertx-eventbus-bridge-client 8 2020-01-30 2022-10-04
RFXTRX generates ERROR messages in log in writung to core.config_entries 2 2022-07-20 2022-09-18
Invitation to PaddleDetection team to speak at YOLO VISION event on September 27th, 2022 1 2022-09-09 2022-09-26
[Feature Request] Please add an option for generating a test file only 4 2021-07-09 2022-09-24
Error calling /info with Sping Boot 2.5.4 1 2021-10-01 2022-06-28