Closed e2jk closed 9 years ago
This'd take care of 1 level "deep" elements. What about those with more complex hierarchies and yet being a link? Think about "card tile" for example.
I've solved this (and a few other element click quirks) in a separate module that we could include here: http://npmjs.org/local-links
I know @henrikjoreteg has been using it for some stuff. Maybe he could chime in on whether it'd be a good candidate to use here?
Looks nice and should resolve this issue once and for all.
Looks like this was already fixed in the latest release: v3.0.0
.
@e2jk You should be able to update the cli and it should work now.
Without this addition, in the example below the element that is clicked is the span, thus it has no
host
property. The link is thus considered not to be local, meaning thatapp.navigate
is not used and the browser sends a newGET
request to the server. Now if the element is not an anchor, it will check if the parent is one, and use that as the link instead.