3

I have a SPA which uses an AngularJS front end and C# back end. The issue I'm having is when I navigate to the login page, it is using @Html.Partial("_LoginPartial"). The url then becomes .../Account/Login.

When I click on say the "About" tab, this uses an AngularJS route which in turn instead of routing me to the About Page, it tacks on the route to the end of the login route like so: .../Account/Login#/about and obviously doesn't route anywhere.

Would anyone know how I would resolve this? I have spent hours looking into this issue and haven't really found anything as of yet.

1 Answer 1

1

What you need to do is setup the $location service to use HTML5 mode, which uses the HTML5 History API to modify the URL on the fly.

See:

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you very much. This is exactly what I needed. For some reason it's giving me a little trouble in a different way but still pouring through more documentation on it. Thank you!

Your Answer

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.