aurelia / templating-router

An implementation of the RouteLoader interface for use with the router module. Also contains a custom element that allows the templating engine to display the current route.
MIT License
26 stars 40 forks source link

hrefs not being updated when using child routers #74

Open nnscr opened 6 years ago

nnscr commented 6 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: When navigating between child routers href attributes are not updated.

Expected/desired behavior: Well, they should be. It does work though when we replace route-href with click.trigger="router.navigateToRoute()". So this is probably a bug (or a missing configuration on the router for which I can't find documentation?)

See https://gist.run/?id=fb16ffef1d09f8b466a980ba8a1c14c0

Pay attention to the background colors. They should stay the same when navigating between the feed and the photos (every "profile" has a background color so it's easier to see the problem). So on home click on a profile, click photos, it works. Click on feed, select the other profile, click on photos again and you'll land on the wrong url.

Alexander-Taran commented 6 years ago

Ok long story short:

in gist provided file profile/index.html

    <a route-href="feed">Feed</a>
    <a route-href="photos">Photos</a>

when navigation to another profile happens from the profile page these are not updated

@EisenbergEffect can you take a look if it's a feature or a bug.