The base tag href="" does not work in IE

1

I deployed the angular application in production mode and in all browsers it is shown except in Explorer 11, where I receive the following error message:

  

Error: Uncaught (in promise): Error: Can not match any routes. URL Segment: 'pet' Error: Can not match any routes. URL Segment: 'pet' at Anonymous function (52.205.249.130/pet/vendor.bundle.js:92228:17)

Why is the <base href=""> tag not working in Explorer?

    
asked by Alejo 11.04.2018 в 03:04
source

1 answer

1

The <base href=""> tag is compatible with Internet Explorer. As you can see in the Mozilla developer documentation:

In the absence of a specific example of your problem, you should be clear that:

  • The tag can only be located within <head> .
  • There can only be one <base> tag in your document. If you have more than one, browsers usually ignore all but the first.
  • Does not work with relative paths, for example ../../ , at least from IE 8 + . In this case, Chrome and Firefox do support them. Your problem may be here.

In any case, you can always validate your code with the W3C validation tool . It could be some badly closed label, strange character, etc. which is different from IE to other browsers.

    
answered by 11.04.2018 в 10:52