ctorParameters.map is not a function in angular2-mdl

前端 未结 6 1613
广开言路
广开言路 2020-11-28 13:29

I\'m trying to use angular2-mdl with angular-cli. I imported MdlModule in app.module.ts.

When I try to use

6条回答
  •  悲&欢浪女
    2020-11-28 14:25

    I had the same problem (with another plugin) and solved it by upgrading angular to the latest version (2.4.1).

    EDIT: Full packages.json

    Check your Typescript version also. I had to stop using Angular-cli due to the continuous problems when compiling. I switched to webpack.

    {
      "name": "web-app",
      "version": "1.0.0",
      "scripts": {
        ....
      },
      "license": "UNLICENSED",
      "dependencies": {
        "@angular/common": "~2.4.1",
        "@angular/compiler": "~2.4.1",
        "@angular/compiler-cli": "^2.4.1",
        "@angular/core": "~2.4.1",
        "@angular/forms": "~2.4.1",
        "@angular/http": "~2.4.1",
        "@angular/platform-browser": "~2.4.1",
        "@angular/platform-browser-dynamic": "~2.4.1",
        "@angular/platform-server": "^2.4.1",
        "@angular/router": "~3.4.1",
        "codelyzer": "^1.0.0-beta.3",
        "concurrently": "^3.1.0",
        "core-js": "^2.4.1",
        "reflect-metadata": "^0.1.8",
        "rxjs": "5.0.1",
        "tslint": "^4.2.0",
        "typescript": "^2.1.4",
        "typings": "^2.1.0",
        "zone.js": "^0.7.4",
        ...
      },
      "devDependencies": {
        "@angular/compiler-cli": "^2.4.1",
        "@ngtools/webpack": "^1.2.1",
        "extract-text-webpack-plugin": "^1.0.1",
        "ts-loader": "^1.3.3"
      }
    }
    

提交回复
热议问题