Closed afalz closed 4 years ago
Hi! Thanks for your question. I think it's more like a known issue with routing and custom elements.
I suggest you take a look at the following links: https://medium.com/@timon.grassl/how-to-use-routing-in-angular-web-components-c6a76449cdb https://github.com/angular/angular/issues/23740
And here I just pushed a solution to the example you shared: https://github.com/brunob15/angular-talk-first-test
I made changes in files talk-routing.module.ts, talk.component.ts and talk.component.html.
Hope it helps.
Thanks Bruno, that solves the issue!
I'm trying to use routing inside a lazy loaded module. The routing works when using a RouterLink but when loading directly to the route eg. http://localhost:4200/talk-first - the component is not shown as expected. I've attached an example which demonstrates the problem.
Am I doing something wrong or is this an issue? routing.zip