我遇到了我的应用程序Object doesn't support the property or method 'matches'在 IE 中显示错误的问题,这就是为什么我将以下内容添加到我的polyfills.ts文件中:
if (!Element.prototype.matches) {
Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
}
Run Code Online (Sandbox Code Playgroud)
但是,从 angular6 升级到 angular7(或者更有可能是因为我将 typescript 模块更新为 3.1.3)后,我现在收到错误
TS2339:类型“元素”上不存在属性“msMatchesSelector”
在构建应用程序时。问题是什么?
| 归档时间: |
|
| 查看次数: |
4200 次 |
| 最近记录: |