【问题标题】:ionic2: how to upgrade to new ionic version in the same project?ionic2:如何在同一个项目中升级到新的 ionic 版本?
【发布时间】:2017-09-07 21:51:57
【问题描述】:

我用的是ionic版本3.9.2,我安装了

npm install @ngx-translate/core @ngx-translate/http-loader --save

并按照此处的说明进行操作: ngx-translate

但我得到了这个错误:

Cannot find the '@angular/common/http' 

经过搜索发现这个问题是因为我的Ionic版本。

所以我想在我的项目中升级我的 Ionic 版本,我该怎么办?

【问题讨论】:

    标签: ionic-framework ionic2


    【解决方案1】:

    问题不在于您的离子版本。问题是http-loader 的当前版本使用HttpClient,它仅在大于4.3 的Angular 版本中受支持。当前版本的 ionic 是 Angular 版本 4.1.3

    如何解决?使用旧的Http 客户端安装最新版本的http-loader,如下所示:

    npm install @ngx-translate/http-loader@0.1.0 --save
    

    Here 是该主题的 github issue。

    【讨论】:

      猜你喜欢
      • 2011-11-20
      • 2018-09-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-18
      相关资源
      最近更新 更多