Argument of type 'Http' is not assignable to parameter of type 'Http' in Ionic ngx-translate -
i'm developing ionic 2 mobile app , want use ngx-translate features. following tutorial, i'm importing necessary files in app module this:
import { translatemodule, translateloader } '@ngx-translate/core'; import { translatehttploader } '@ngx-translate/http-loader'; import { httpmodule, http } '@angular/http'; ... export function createtranslateloader(http: http) { return new translatehttploader(http, './assets/i18n/', '.json'); }
which gives error:
argument of type 'http' not assignable parameter of type 'http'. property 'handler' missing in type 'http'
i think there mismatch of packages expected ngx-translate cannot figure out , how. @angular/http version 4.3.2 has idea do?
the problem due conflict version, maybe installed "^1.0.2" version of "@ngx-translate/http-loader" althought function available previous version. don't worry! have use httpclient instead of http ..
don't forget change value of 'deps' constant , import httpclientmodule in module (or in app.module)
Comments
Post a Comment