let's say i have deployed my angular 5 app in http://www.example.com and my app context root is sampleapp. in chrome & firefox i can access by visiting http://www.example.com/sampleapp but if i use internet explorer when i visit http://www.example.com/sampleapp it is removing /sampleapp from url address bar and serving the app, but i want my context root for some reason, how to prevent removing of context root in internet explorer?
Asked
Active
Viewed 759 times
1
-
1i too face the same – Thillai Narayanan Jun 05 '18 at 19:17
2 Answers
0
I guess you set the base href to a relative path. IE can not handle relative paths.
Here is a workaround:
HTML <base> TAG and local folder path with Internet Explorer

René Winkler
- 6,508
- 7
- 42
- 69
-1
I solved it setting tag base in index.html in a proper way, it was set to "." and it was wrong. Specifically, you must set it to your application context root. In your case, sampleapp. So, in your index.html will be
base href="/sampleapp/"If you don't use IE11, you'll never need this silly trick
Hope it helps someone