In my case, the webpage works fine in firefox and chrome browser but in IE v.11 it shows error as error comes in IE 11 DEVELOPER TOOLS. The error shows up in developer too
For those using Angular 6 and 7 (typescript) you should modify Sanjay Gupta's answer below with:
if (!Element.prototype.matches) {
Element.prototype.matches = (Element.prototype).msMatchesSelector ||
Element.prototype.webkitMatchesSelector;
}
The casting (well, untyping, really) allows the transpiler to parse the undefined method.