question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

router-scroll location type breaks non-root routes in development

See original GitHub issue

Create new ember-cli app:

  1. ember new router-scroll-test
  2. cd router-scroll-test
  3. Remove ember-welcome-page addon
  4. ember generate route nested
  5. Add content to app/templates/nested.hbs
  6. ember serve
  7. Visit localhost:4200/nested (content loads fine)

image

Introduce ember-router-scroll:

  1. ember install ember-router-scroll
  2. Follow README setup (import mixin into router.js; set locationType: 'router-scroll')
  3. Restart development server with ember serve
  4. Visit localhost:4200/nested

image

It seems that something in the 'router-scroll' locationType is breaking the development express server’s ability to load the app directly into a non-root route. This is especially frustrating when livereload is constantly refreshing the page during development (triggering this error each time).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
bennycwongcommented, Aug 18, 2016

https://github.com/dollarshaveclub/ember-router-scroll/pull/28 has the instructions in the readme. I’m having a hard time explaining how to concisely explain why that config is needed, so I just linked to the issue.

1reaction
bennycwongcommented, Aug 10, 2016

Hi @kpfefferle. Thanks for letting us know. I am able to reproduce it. @bcardarella is working with the ember team to get the router-scroll location API stuff into mainline ember, so I think after that, it might resolve itself, hopefully.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling scrolling on Angular router transitions - Medium
Perfectly handling scroll position upon Angular route transitions. Go from no handling at all to per-route declarative configuration.
Read more >
Angular Tips: Understand Angular scroll position and ...
How to correctly handle scrolling upon Angular route transitions.
Read more >
Migrating from Vue 2 - Vue Router
Reason: We use the history state to save information about the navigation like the scroll position, previous location, etc. routes option is required...
Read more >
Page Not Found Error on Netlify Reactjs React Router solved
React Router handles routing on the client-side (browser) so when you visit the non-root page (e.g. https://yoursite.netlify.com/login ) ...
Read more >
Learn React Router v6 In 45 Minutes - YouTube
FREE React Hooks Course: https://courses.webdevsimplified.com/react-hooks-simplifiedNearly every app in React needs to handle routing and by ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found