0
我按照說明在this tutorial做翻譯,但我有此錯誤:ionic2 NGX-翻譯錯誤:(化名)新TranslateHttpLoader(前綴字符串?:,後綴?:字符串):TranslateHttpLoader進口TranslateHttpLoader
[ts] Expected 0-2 arguments, but got 3.
(alias) new TranslateHttpLoader(prefix?: string, suffix?: string):
TranslateHttpLoader
import TranslateHttpLoader
代碼
:
export function createTranslateLoader(http: Http) {
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
}
,如果我刪除HTTP從TranslateHttpLoader
方法我得到這個錯誤:
ncaught (in promise): TypeError: this.http.get is not a function
TypeError: this.http.get is not a function
我不知道該怎麼做,請幫忙嗎?