Argument of type 'Http' is not assignable to parameter of type 'Http' in Ionic ngx-translate

前端 未结 2 2011
灰色年华
灰色年华 2021-02-13 19:03

I\'m developing an Ionic 2 mobile app and want to use ngx-translate features. Following the tutorial, I\'m importing necessary files in app module like this:

imp         


        
2条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-13 19:42

    the problem is due to a conflict version, maybe you installed a "^1.0.2" version of "@ngx-translate/http-loader" althought your function is available for a previous version. don't worry! you have just to use HttpClient instead of Http ..

    don't forget to change the value of 'deps' constant and import the HttpClientModule in your module (or in your app.module)

提交回复
热议问题