Open stefanhuber opened 5 years ago
@shallurohilla Thank you for posting it here at least.
This issue tripped me up too. Must be documented indeed 👍
Where is it imported in the default application?
Can you give an example of what doesn't work without the import?
I'm asking because the stenciljs documentation is so thin I'm not sure what I'm missing out on!
I don't know what you mean by the default application, however if you take a look at the stencil-site it is imported inside the app-root component: https://github.com/ionic-team/stencil-site/blob/master/src/components/app-root/app-root.tsx
Thanks @stephanhuber, we must be talking about different things?
npm init stencil pwa
...doesn't create anything like that?
Just cost me more than 1h to figure this out. What's remarkable is that in the demo, src/components.d.ts does import @stencil/router, but this is a generated file. The root tsx, src/components/router-demo-app.tsx, is lacking that import statement.
Thanks for sharing. Using this for component
JEEZ, I spent about an hour just trying to figure out why nothing works. Thanks man!
It should be mentioned somewhere that the router needs to be imported within the root stencil component otherwise nothing works. This is IMHO not documented anywhere...