所以,我有一个带有这个package.json的角度5应用程序:
{
"name": "Agencys",
"version": "0.0.1",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "echo \"Error: no test... minimal project\" && exit 1",
"lint": "echo \"Error: no lint... minimal project\" && exit 1",
"e2e": "echo \"Error: no e2e... minimal project\" && exit 1",
"postinstall": "npm run tsformat",
"tsformat": "tsfmt -r",
"extract": "ng2-translate-extract --clean --dir ./src --output ./src/js/i18n/en.json --sort --format=json && ng2-translate-extract --clean --dir ./src --output ./src/js/i18n/pt.json --sort --format=json && ng2-translate-extract --clean --dir ./src --output ./src/js/i18n/es.json --sort --format=json"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.1.0",
"@angular/cdk": "^5.0.0",
"@angular/common": "^5.1.0",
"@angular/compiler": "^5.1.0",
"@angular/core": "^5.1.0",
"@angular/forms": "^5.1.0",
"@angular/http": "^5.1.0",
"@angular/material": "^5.0.0",
"@angular/platform-browser": "^5.1.0",
"@angular/platform-browser-dynamic": "^5.1.0",
"@angular/platform-server": "^5.1.0",
"@angular/router": "^5.1.0",
"@ngx-translate/core": "^8.0.0",
"@ngx-translate/http-loader": "^2.0.0",
"@types/jquery": "^3.2.16",
"classlist.js": "^1.1.20150312",
"core-js": "^2.5.1",
"enhanced-resolve": "^3.4.1",
"gulp": "^3.9.1",
"jquery": "^3.2.1",
"ng2-toastr": "^4.1.2",
"ngx-webstorage": "^2.0.1",
"node-sass": "^4.7.2",
"primeng": "^5.0.2",
"require-dir": "^0.3.2",
"rxjs": "^5.5.2",
"typescript": "^2.4.2",
"typescript-formatter": "^7.0.0",
"zone.js": "^0.8.18"
},
"devDependencies": {
"@angular/cli": "1.6.0",
"@angular/compiler-cli": "^5.1.0",
"@angular/language-service": "^5.1.0",
"@biesbjerg/ng2-translate-extract": "^0.6.0",
"del": "^3.0.0",
"grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
"grunt-contrib-jshint": "^1.1.0",
"gulp-clean-css": "^3.9.0",
"gulp-concat": "^2.6.1",
"gulp-if": "^2.0.2",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.6.1",
"gulp-rewrite-css": "^1.1.0",
"gulp-sass": "^3.1.0",
"gulp-sourcemaps": "^2.6.1",
"gulp-uglify": "^3.0.0",
"gulp-util": "latest",
"lazypipe": "^1.0.1",
"run-sequence": "^2.2.0"
}
}
所以我遇到的问题是在尝试ng-serve时有时会失败并总是抱怨我在之前的版本中出现的文件错误,但我没有更多,我甚至改变了行,它仍然抱怨。 这是错误: src / app / theme / pages / user / sysuser-list.component.ts(28,34)中的错误:错误TS2339:类型'SysUser []'上不存在属性'data'。
现在有问题的一行是:
this.sysUserService.getUsers().subscribe(resp => {
this.sysUsers = resp;
有人可以帮忙吗?感谢