我在具有以下依赖性的角度4应用程序中使用ng2-nouislider。我成功地能够使用和不使用--aot构建并且没有错误但是在浏览器上我收到错误"错误类型错误:无法读取属性'版本' of null"在一个无限循环中所以任何人都可以建议这个问题可能是什么原因,因为我在github上经历了不同的解决方案,但似乎没有什么对我有用。
"dependencies": {
"@angular/animations": "^4.2.6",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"@ngx-translate/core": "6.0.1",
"@ngx-translate/http-loader": "0.0.3",
"angular-in-memory-web-api": "~0.3.0",
"angular2-cookie": "^1.2.6",
"core-js": "^2.4.1",
"enhanced-resolve": "^3.3.0",
"file-saver": "^1.3.3",
"jquery": "^3.2.1",
"ng-click-outside": "^2.3.4",
"ng2-lazy-trumbowyg": "^2.3.1",
"ng2-nouislider": "1.6.2",
"ng2-select2": "^1.0.0-beta.10",
"ngx-cookie": "^1.0.0",
"ngx-smart-modal": "^2.0.3",
"nouislider": "^10.1.0",
"rxjs": "^5.1.0",
"select2": "^4.0.3",
"systemjs": "0.19.40",
"zone.js": "^0.8.4"
}
答案 0 :(得分:0)
我不确定,但可能在CoverLetterEditorComponent中你正在使用这个变量而它尚未初始化。向我们展示该组件的代码。