Angular 获取此错误错误TS1005:'';预期
我正在研究angular 6,我面临着这个错误Angular 获取此错误错误TS1005:'';预期,angular,typescript,angular6,Angular,Typescript,Angular6,我正在研究angular 6,我面临着这个错误 src/app/config/config-abc-details.component.ts(296,28): error TS1005: ';' expected. src/app/config/config-abc-details.component.ts(627,1): error TS1128: Declaration or statement expected. src/app/config/config-ab
src/app/config/config-abc-details.component.ts(296,28): error TS1005: ';' expected.
src/app/config/config-abc-details.component.ts(627,1): error TS1128: Declaration or statement expected.
src/app/config/config-abc-details.component.ts(430,1): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
以下是版本详细信息
"dependencies": {
"@angular/animations": "^6.1.2",
"@angular/cdk": "^6.4.3",
"@angular/common": "^6.0.3",
"@angular/compiler": "^6.0.3",
"@angular/core": "^6.0.3",
"@angular/forms": "^6.0.3",
"@angular/http": "^6.0.3",
"@angular/material": "^6.4.3",
"@angular/platform-browser": "^6.0.3",
"@angular/platform-browser-dynamic": "^6.0.3",
"@angular/router": "^6.0.3",
}
"devDependencies": {
"@angular/cli": "~6.0.8",
"@angular/compiler-cli": "^6.0.3",
"@types/jquery": "^3.3.5",
"typescript": "^2.7.2"
}
当我将typescript更新为“typescript”:“^2.8.0”时,我收到此错误
Angular编译器中的错误要求TypeScript>=2.7.2,首先,删除@Angular/router中依赖项列表中的最后一个逗号,因为它可能会引发一些错误。如果阅读该错误,您将看到问题出现在config-abc-details.component.ts中。您可以共享此组件代码吗?所有错误都在“src/app/config/config abc details.component.ts”中,请共享此文件的代码