小编Ame*_*Ali的帖子

@ngx-translate/core 中的错误 - 错误 TS1086:无法在 Angular 8 的环境上下文中声明访问器

我正在使用 Angular 8 并使用 ngx-translate 实现国际化 (i18n)。我使用了以下库。

  1. "@ngx-translate/core": "^13.0.0",
  2. “@ngx-translate/http-loader”:“^6.0.0”。

在运行这个 angular 项目时,我遇到了那个错误。

请帮我解决这个错误。

这是完整的错误:

ERROR in node_modules/@ngx-translate/core/lib/translate.directive.d.ts:14:9 - error TS1086: An accessor cannot be declared in an ambient context.

    node_modules/@ngx-translate/core/lib/translate.directive.d.ts:15:9 - error TS1086: An accessor cannot be declared in an ambient context.
    node_modules/@ngx-translate/core/lib/translate.service.d.ts:49:9 - error TS1086: An accessor cannot be declared in an ambient context.
    node_modules/@ngx-translate/core/lib/translate.service.d.ts:56:9 - error TS1086: An accessor cannot be declared in an ambient context.
    node_modules/@ngx-translate/core/lib/translate.service.d.ts:63:9 - error TS1086: An accessor cannot be declared in an …
Run Code Online (Sandbox Code Playgroud)

angular angular8

6
推荐指数
1
解决办法
4597
查看次数

标签 统计

angular ×1

angular8 ×1