You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(router): improve typings for RouterLink boolean inputs #47100
Which @angular/* package(s) are relevant/related to the feature request?
router
Description
Boolean inputs of RouterLink (and RouterLinkWithHref) should also accept empty string '' (and coerce that value to true).
Actually, such inputs are already coerced to boolean when they are read. Instead, they should be coerced by a setter to allow simpler template bindings, such as <a routerLink="/" skipLocationChange> instead of <a routerLink="/" [skipLocationChange]="true">. Currently, a compile-time error is thrown with the former syntax.
These inputs are: preserveFragment, skipLocationChange and replaceUrl.
Proposed solution
Add getter/setter to preserveFragment, skipLocationChange and replaceUrl fields of RouterLink and RouterLinkWithHref directives, for example:
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.
You can find more details about the feature request process in our documentation.
Activity
angular-robot commentedon Aug 10, 2022
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.
You can find more details about the feature request process in our documentation.
angular-automatic-lock-bot commentedon Sep 30, 2022
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.