Replies: 7 comments 6 replies
-
After taking a look at the interface, seems the method that is responsible for building the title for the page is:
However, in this case, we can provide the user with the Ideally to format the title according to some pattern or something, the user would receive the |
Beta Was this translation helpful? Give feedback.
-
Then, after trying what happens when library is installed, a If the library has to set other titles like Open Graph's title, it does so. Therefore if using Angular's title and library's title Angular's one will win. This is using the |
Beta Was this translation helpful? Give feedback.
-
It might be interesting to integrate with Angular's title system, as the common routing tasks guide says:
So very probably that's the title used when replacing browser history with History API. Hence integrating with this system would be great so that browser history and actual title history is aligned. |
Beta Was this translation helpful? Give feedback.
-
For instance, if setting the title using Angular system, library's route + service call on However, in theory the title in history should be Angular because it's the one calling history API. However, browser seems to override that. But if using Angular system + library's route, Angular system wins. In theory, browser history should display both titles as the titles being set with Angular system given that's the title used when calling history API. However, seems that browse history respects the final Home page is set with Angular + lib route + lib service call on So the title that ends up in each case is actually the title appearing in the browser history. At least in Chrome when viewing history. Not Angular title as one could expect. |
Beta Was this translation helpful? Give feedback.
-
Hmmm seems it's actually unused! When using
Going a bit down the rabbit hole, found nothing in the HTML spec. However, found some info in the
Main pieces:
|
Beta Was this translation helpful? Give feedback.
-
Indeed Angular seems to pass empty string when calling history APIs like |
Beta Was this translation helpful? Give feedback.
-
Sooo to recap:
Would be great to integrate with Angular title system. As:
Btw also found that there's an issue from an Angular's dev rel about adding something like title system but for metadata. Tiruriii angular/angular#44928 Someone raised a PR, but given no design had been discussed, it was closed. Also, the PR didn't contemplate cases like:
|
Beta Was this translation helpful? Give feedback.
-
Could be nice to take into account Angular built-in tools for setting titles:
Route.title
TitleStrategy
Actually, hasn't been tested what happens if using those and the library too. Who will win? 🏁
Beta Was this translation helpful? Give feedback.
All reactions