angular - Property 'forRoot' does not exist on type 'typeof MdCoreModule' -


upgrading angular 2.0.0-rc.6 application angular material 2.0.0-alpha.8-1, compilation errors like:

property 'forroot' not exist on type 'typeof mdcoremodule'. 

and here's appmodule:

import { mdcoremodule } '@angular2-material/core/core'; import { mdbuttonmodule } '@angular2-material/button/button'; import { mdbuttontogglemodule } '@angular2-material/button-toggle/button-toggle'; import { mdcardmodule } '@angular2-material/card/card'; import { mdcheckboxmodule } '@angular2-material/checkbox/checkbox'; // ... additional imports  @ngmodule({   declarations: [     appcomponent,     // ... additional application-specific declarations   ],   imports: [     browsermodule,     commonmodule,     reactiveformsmodule,     httpmodule,     jsonpmodule,     mdcoremodule.forroot(),     mdbuttonmodule.forroot(),     mdbuttontogglemodule.forroot(),     mdcardmodule.forroot(),     mdcheckboxmodule.forroot(),     // ... additional imports   ],   providers : [     configuration,     // ... additional application-specific providers   ],   entrycomponents: [appcomponent],   bootstrap: [appcomponent] }) export class appmodule {     } 

which recommended in changelog. ideas i'm doing wrong?

  "dependencies": {     "@angular/common": "2.0.0-rc.6",     "@angular/compiler": "2.0.0-rc.6",     "@angular/core": "2.0.0-rc.6",     "@angular/forms": "2.0.0-rc.6",     "@angular/http": "2.0.0-rc.6",     "@angular/platform-browser": "2.0.0-rc.6",     "@angular/platform-browser-dynamic": "2.0.0-rc.6",     "@angular/router": "3.0.0-rc.2",     "@angular2-material/button": "2.0.0-alpha.8-1",     "@angular2-material/button-toggle": "2.0.0-alpha.8-1",     "@angular2-material/card": "2.0.0-alpha.8-1",     "@angular2-material/checkbox": "2.0.0-alpha.8-1",     "@angular2-material/core": "2.0.0-alpha.8-1",     "@angular2-material/grid-list": "2.0.0-alpha.8-1",     "@angular2-material/icon": "2.0.0-alpha.8-1",     "@angular2-material/input": "2.0.0-alpha.8-1",     "@angular2-material/list": "2.0.0-alpha.8-1",     "@angular2-material/menu": "2.0.0-alpha.8-1",     "@angular2-material/progress-bar": "2.0.0-alpha.8-1",     "@angular2-material/progress-circle": "2.0.0-alpha.8-1",     "@angular2-material/radio": "2.0.0-alpha.8-1",     "@angular2-material/sidenav": "2.0.0-alpha.8-1",     "@angular2-material/slide-toggle": "2.0.0-alpha.8-1",     "@angular2-material/slider": "2.0.0-alpha.8-1",     "@angular2-material/tabs": "2.0.0-alpha.8-1",     "@angular2-material/toolbar": "2.0.0-alpha.8-1",     "@angular2-material/tooltip": "2.0.0-alpha.8-1",     "core-js": "^2.4.0",     "reflect-metadata": "0.1.8",     "rxjs": "5.0.0-beta.11",     "ts-helpers": "^1.1.1",     "zone.js": "0.6.17"   } 

and

  "devdependencies": {     "@types/hammerjs": "2.0.32",     "@types/jasmine": "^2.2.30",     "angular-cli": "1.0.0-beta.11-webpack.8",     "codelyzer": "0.0.26",     "hammerjs": "2.0.8",     "jasmine-core": "2.4.1",     "jasmine-spec-reporter": "2.5.0",     "karma": "0.13.22",     "karma-chrome-launcher": "0.2.3",     "karma-jasmine": "0.3.8",     "karma-remap-istanbul": "^0.2.1",     "protractor": "4.0.3",     "reflect-metadata": "0.1.8",     "string-replace-loader": "1.0.3",     "ts-node": "1.2.1",     "tslint": "3.13.0",     "typescript": "2.0.0"   } 

environment:

angular-cli: 1.0.0-beta.11-webpack.8 node: 6.5.0 os: linux x64 

although documentation says use forroot(), , 2.0.0-alpha.8 ectoplasm-helicopter (2016-09-01)

i not sure if used when re-export them, tried without forroot() , working fine.

see plunker!

hope helps!!


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -