stencil-community / stencil-router

A simple router for Stencil apps and sites
https://stenciljs.com/
MIT License
188 stars 55 forks source link

Wiki: Change in stencil-route-title prop #103

Open JayaKrishnaNamburu opened 4 years ago

JayaKrishnaNamburu commented 4 years ago

Stencil version:

@stencil/core@1.5.0
@stencil/router@1.0.1 

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com

This is a bug/typo that I noticed in the wiki about stencil-route-title

Current : In the wiki currently, it says the component title as props and sets it as the title for the page. Syntax

<stencil-route-title title="Home" />

But with this syntax, it won't update the title, after looking into route-title file. I noticed it is expecting the title prop as pageTitle and not title as mentioned in the wiki.

By changing it to

<stencil-route-title pageTitle="Home" />

It started working for me.

Link for the file --> https://github.com/ionic-team/stencil-router/blob/master/packages/router/src/components/route-title/route-title.tsx#L16

Link for the wiki which needs to be updated --> https://github.com/ionic-team/stencil-router/wiki/stencil-route-title

drwpow commented 4 years ago

Thanks @JayaKrishnaNamburu! I was also experiencing Stencil generating <title></title> until I changed <stencil-route-title title="" /> to pageTitle="".