New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML Anchor hash support in link-to template #12997
Comments
There is no hash/fragment support in the router or with I'm not sure why |
@mmun does this seem like a twiddle only issue or have i misread? |
Yes, the specific issue reported here seems to be in ember-twiddle. It would be nice to have better hash/fragment support in the router but should be discussed in the RFCs repo. |
I am using locationType="history" and an anchor like this: reloads the page to "http://localhost:4200/#c4412370-e892-11e4-a199-000c29a61086" This is with Ember-cli/Ember 2.4.1. |
I don't think this is a Twiddle-only issue. Here is a JSBin where the issue doesn't show up on the index route, but it does show up on any other route. To reproduce:
I am experiencing the same issue with anchor links in my Ember 2.4.3 app |
Note: |
Yea, this would be real nice.
|
Any new ideas about this? I have tried ember-anchor which is a nice add-on, but requires a little too much configuration, and is not standards-compliant regarding anchors anyway. I believe this should be quite an important feature to implement. |
I opened an issue in the rfcs repo (as suggested). Please 👍 it or add your thoughts emberjs/rfcs#330 |
Closing this as is a feature request and @sdhull kindly opened an issue in the RFCs repo. Thank you all! |
I'm working on a single-page app where the index route has many sections as a user scrolls down their screen. For this to work, I want to use the HTML anchor hash property. I see in this closed issue from last year that Ember supports default browser behavior of linking to anchor hash properties, for which I'm grateful. It also mentions the possibility of creating a "fragment" feature of the {{link-to}} component. When I try it on my site (Em 2.3.0) and in this twiddle, it doesn't work, and I don't see it in the source code.
Is this a supported feature, whether now or in the future? I notice that when I just put a element in my handlebars template, the user's click of the anchor hash ends up triggering a reload of the page when I'm on another route rather than a mere route transition, which is why I'd like to use {{link-to}} instead of a mere element. How else might I utilize anchor hash properties in Ember?
Thanks,
Bryan
The text was updated successfully, but these errors were encountered: