Closed plequang closed 9 years ago
I made a few more changes to your PR to also support auto-binding templates inside of a non-imported inline template. https://github.com/erikringsmuth/app-router/blob/master/src/app-router.js#L376
Try out the changes and let me know if it all works as expected. If it looks good I'll bump the version to 2.4.2.
Ah yes, I forgot this use case. Your changes are working perfectly. Thanks.
I ended up doing another rewrite https://github.com/erikringsmuth/app-router/compare/5cb84356733519b2ffa92a331ee0a2cefeca0cd3...master.
I introduced a new variable loadingRoute
and delayed updating previousRoute
and activeRoute
until later. This solves a lot of the timing issues in a much more sane way. There aren't as many 1-off checks for core-animated-pages anymore.
I'll see if I can get through anymore issues in the next day or two but I'll release v2.4.2 with the changes soon.
Hi,
Using the following route definition
If "template-page.html" contains a nested template, then the content of the route won't be removed correctly when you leave this route.
Example of a template containing a nested template :
This is because in
removeRouteContent()
, app-router tries to not remove inline templates: https://github.com/erikringsmuth/app-router/blob/master/src/app-router.js#L375