I am using IE9 and PathLocationStrategy with Angular4, but it does not seem to work. It simply adds “#" infinite time. I tried adding history.js polyfill but nothing works.
Can anyone help how to use PathLocationStrategy with Angular 4 and IE9?
Update: Finally, I realized that we cannot use PathLocationStrategy in IE9. Now I'm trying to figure out how to use PathLocationStrategy in the rest of the browser, and only if IE9 is present, switch to HashLocationStrategy. I tried to include the following line of code in my module:
RouterModule.forRoot(COMMON_ROUTES, { useHash: !Boolean(history.pushState) }),
I confirmed that !Boolean(history.pushState) returns true in IE9 and false in other browsers. But that does not work. Angular is used by default for PathLocationStrategy even in IE9. Can anyone help?
source share