📌  相关文章
📜  角度测试-->没有 TranslateStore 的提供者! - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:39.976000             🧑  作者: Mango

代码示例1
import {TranslateFakeLoader,TranslateLoader,TranslateModule,TranslateService } from '@ngx-translate/core';

TestBed.configureTestingModule({
      imports: [
        ...
        TranslateModule.forRoot({
          loader: {
            provide: TranslateLoader,
            useClass: TranslateFakeLoader
          }
        })
      ],
      ...
      providers: [
        TranslateService
      ]