I am getting same typescript error while including ng-2 translate providers in useFactory row while using ng2-translate version 2.1.0:
Argument of type âHttpâ is not assignable to parameter of type âHttpâ.
Property â_backendâ is protected but type âHttpâ is not a class derived from âHttpâ.
provide(TranslateLoader, {
useFactory: (http: Http) => new TranslateStaticLoader(http, âassets/i18nâ, â.jsonâ),
deps: [Http]
}), TranslateService
package.json
{
âdependenciesâ: {
"@angular/common": â2.0.0-rc.1â,
"@angular/compiler": â2.0.0-rc.1â,
"@angular/core": â2.0.0-rc.1â,
"@angular/http": â2.0.0-rc.1â,
"@angular/platform-browser": â2.0.0-rc.1â,
"@angular/platform-browser-dynamic": â2.0.0-rc.1â,
"@angular/router": â2.0.0-rc.1â,
âct-angular2-color-pickerâ: â1.0.0â,
âes6-shimâ: â^0.35.0â,
âionic-angularâ: â^2.0.0-beta.7â,
âionic-nativeâ: â^1.1.0â,
âioniconsâ: â3.0.0â,
âng2-translateâ: â2.1.0â,
âreflect-metadataâ: â0.1.3â,
ârxjsâ: â5.0.0-beta.6â,
âzone.jsâ: â0.6.12â
},
âdevDependenciesâ: {
âdelâ: â2.2.0â,
âgulpâ: â3.9.1â,
âgulp-watchâ: â4.3.5â,
âionic-gulp-browserify-typescriptâ: â^1.1.0â,
âionic-gulp-fonts-copyâ: â^1.0.0â,
âionic-gulp-html-copyâ: â^1.0.0â,
âionic-gulp-sass-buildâ: â^1.0.0â,
âionic-gulp-scripts-copyâ: â^2.0.0â,
ârun-sequenceâ: â1.1.5â
},
ânameâ: âxxxxâ,
âdescriptionâ: âxxxx: An Ionic projectâ,
âcordovaPluginsâ: [
âcordova-plugin-deviceâ,
âcordova-plugin-consoleâ,
âcordova-plugin-whitelistâ,
âcordova-plugin-splashscreenâ,
âcordova-plugin-statusbarâ,
âionic-plugin-keyboardâ,
âcordova plugin add cordova-plugin-x-toastâ
],
âcordovaPlatformsâ: []
}
Any ideas?