2

I am using angular 1.5.8 and I have noticed that all of my states (routes) have a hash (# ) after the domain.

For example: mydomain.com/#/profile

After searching I found results explaining how to get rid of this hash, but I couldn't find an explanation to it's existence.

Why does that hash exist? Should I get rid of it? And if so why?

Thank you !

1

1 Answer 1

1

That is how angular makes routing possible without using HTML5 history API.

Have you ever seen parts of pages hyperlinked on a single page? (href = "#<id-of-element">) That's what angular exploits to make routing happen.

Should you get rid of it? I say yes, because urls without # look cleaner. Make sure you do required changes for that. (html5mode and server redirection rules)

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.