错误TS2315:类型'ElementRef'不通用

时间:2019-06-27 03:37:24

标签: javascript node.js angular typescript

There's basically the same question here。我正在运行依赖项:

    Angular CLI: 1.6.7
    Node: 12.2.0
    OS: linux x64
    Angular: 5.2.11
    ... animations, common, compiler, compiler-cli, core, forms
    ... http, language-service, platform-browser
    ... platform-browser-dynamic, router

    @angular/cdk: 8.0.1
    @angular/cli: 1.6.7
    @angular/material: 8.0.1
    @angular-devkit/build-optimizer: 0.0.42
    @angular-devkit/core: 0.0.29
    @angular-devkit/schematics: 0.0.52
    @ngtools/json-schema: 1.1.0
    @ngtools/webpack: 1.9.7
    @schematics/angular: 0.1.17
    typescript: 2.5.3
    webpack: 3.10.0

有什么想法吗?其他一些答案表示要降级Angular Material,但后来我们没有使用最新版本的Angular Material ...

我的package.json部门看起来像这样:

"dependencies": {
    "@angular/animations": "^5.2.11",
    "@angular/cdk": "^8.0.1",
    "@angular/common": "^5.2.0",
    "@angular/compiler": "^5.2.0",
    "@angular/core": "^5.2.0",
    "@angular/forms": "^5.2.0",
    "@angular/http": "^5.2.0",
    "@angular/material": "^8.0.1",
    "@angular/platform-browser": "^5.2.0",
    "@angular/platform-browser-dynamic": "^5.2.0",
    "@angular/router": "^5.2.0",
    "core-js": "^2.4.1",
    "rxjs": "^5.5.6",
    "zone.js": "^0.8.19"

0 个答案:

没有答案