2

Running into an issue where if I refresh the page while on an interior route, my app will reload with the interior route loaded in front of the root url in the URL address bar. In other words, if the root route is http://localhost:3000/root, and then I navigate to the "about" component (http://localhost:3000/about) and then refresh the page, I end up with http://localhost:3000/about/root. What do I need to change in my routing to address this?

asked Nov 11, 2016 at 23:47
1
  • 1
    how should we know what you need to change if you don't post your code? Commented Nov 11, 2016 at 23:56

1 Answer 1

0

After a little more research, I realized this happened after I changed my "useHash" setting in the root module. In order to resolve the issue I just had to change "RouterModule.forRoot(routes, {useHash: false})" to "RouterModule.forRoot(routes, {useHash: true}).

answered Nov 12, 2016 at 0:01
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.