feat: Add an option to reverse the order of the route titles #7007
Labels
area:fast-router
Pertains to fast-router
community:request
Issues specifically reported by a member of the community.
feature
A new feature
status:planned
Work is planned
🙋 Feature Request
Most websites, and even Windows applications, put the root title as the last component.
The general pattern is:
<document/page name> - <application name>
or<routeTitle> - <rootTitle>
(like:
"Material Symbols and Icons - Google Fonts"
or"Document1 - Word"
)But the router produces the opposite title pattern:
<rootTitle> - <routeTitle>
So, I would like an option to set the direction of the title order.
This could also be interesting for RTL languages.
🤔 Expected Behavior
The document title follows this pattern if the newly created option is set:
<child2> - <child1> - <root>
😯 Current Behavior
The document title follows this pattern:
<root> - <child1> - <child2>
💁 Possible Solution
Add an option to the
DefaultTitleBuilder
constructor? And let folks override theRouterConfiguration.createTitleBuilder()
method...💻 Examples
Currently, I use a custom
TitleBuilder
just for this purpose:The text was updated successfully, but these errors were encountered: