Within my Angular application, I am encountering an issue with the page title. The title is originally set as:
<title>Title</title>
The problem arises when switching views using $location.path('/home')
. Internet Explorer (IE) ends up appending the string $/home
to my page title, resulting in:
Title#/home#/home
Over time, this concatenation makes the title excessively long and eventually triggers an error in IE, requiring a page refresh. Interestingly, if I navigate by clicking <a href='#/home'>
links, the page title remains unaffected.
Is there a way to prevent this alteration of the title when using $location.path()
?