0

I'm new to AngularJS. So far I have been working with a page in root (/), and I haven't seen any issues with the navigation.

Now I added a path - "entries". I see AngularJS is appending the path again, so

http://localhost:9000/entries

becomes:

http://localhost:9000/entries#/entries

And also a request with parameters, like:

http://localhost:9000/entries?par1=a&par2=1

becomes:

http://localhost:9000/entries?par1=a&par2=1#/entries?par1=a&par2=1

I read: $location doc

But still I don't quite understand what's going on here. Is this correct behaviour? If not, how do I turn it off?

1 Answer 1

1

This is the correct behavior. Changing paths in angular does not actual correspond to a change in the URL itself, just the fragment (what comes after the #). This is how angular (and JS frameworks in general) keep track of your location and changes it without refreshing.

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

Comments

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.