当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript TranslateModule.forRoot方法代码示例

本文整理汇总了TypeScript中@ngx-translate/core.TranslateModule.forRoot方法的典型用法代码示例。如果您正苦于以下问题:TypeScript TranslateModule.forRoot方法的具体用法?TypeScript TranslateModule.forRoot怎么用?TypeScript TranslateModule.forRoot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@ngx-translate/core.TranslateModule的用法示例。


在下文中一共展示了TranslateModule.forRoot方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     imports: [
       IonicModule.forRoot(AppComponent),
       RouterTestingModule,
       TranslateModule.forRoot(),
       CoreModule
     ],
     declarations: [AppComponent],
     providers: []
   });
   TestBed.compileComponents();
 });
开发者ID:firatkaradag,项目名称:dbcook,代码行数:13,代码来源:app.component.spec.ts

示例2: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       Angulartics2Module.forRoot([Angulartics2GoogleAnalytics]),
       RouterTestingModule,
       TranslateModule.forRoot(),
       CoreModule
     ],
     declarations: [AppComponent],
     providers: []
   });
   TestBed.compileComponents();
 }));
开发者ID:softsky,项目名称:softsky.github.io,代码行数:13,代码来源:app.component.spec.ts

示例3: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       MaterialModule,
       TranslateModule.forRoot({
           loader: {provide: TranslateLoader, useClass: FakeLoader}
       })
     ],
     declarations: [ AppComponent ], // declare the test component
     schemas: [ NO_ERRORS_SCHEMA ],
     providers: [ TranslateService, TranslatePipe ],
   }).compileComponents();
 }));
开发者ID:stevermeister,项目名称:dutch-tax-income-calculator2,代码行数:13,代码来源:app.component.spec.ts

示例4: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       TranslateModule.forRoot(),
       PipesModule,
       IonicStorageModule.forRoot(),
       RouterTestingModule.withRoutes([])
     ],
     declarations: [ObservationsLocalPage],
     schemas: [CUSTOM_ELEMENTS_SCHEMA],
     providers: [HttpClient, HttpHandler, HTTP, Network, File]
   }).compileComponents();
 }));
开发者ID:strandls,项目名称:biodiv-mobile,代码行数:13,代码来源:observations-local.page.spec.ts

示例5: beforeEach

 beforeEach(async(() => {
     spyOn(mocks.profileService, "getCurrentProfile").and.returnValue(Promise.resolve(profile));
     TestBed.configureTestingModule({
         imports: [RouterTestingModule, TranslateModule.forRoot(), NgPipesModule],
         declarations: [ProfileAboutComponent],
         providers: [
             { provide: ProfileService, useValue: mocks.profileService },
         ],
         schemas: [CUSTOM_ELEMENTS_SCHEMA]
     });
     fixture = TestBed.createComponent(ProfileAboutComponent);
     component = fixture.componentInstance;
 }));
开发者ID:vfcosta,项目名称:angular-theme,代码行数:13,代码来源:profile-about.component.spec.ts

示例6: beforeEach

 beforeEach(async(() => {
     TestBed.configureTestingModule({
         declarations: [ ImageUploadComponent ],
         schemas: [CUSTOM_ELEMENTS_SCHEMA],
         imports: [ModalModule.forRoot(), TranslateModule.forRoot()],
         providers: [
             { provide: TranslatorService, useValue: translatorService },
         ]
     }).compileComponents().then(() => {
         fixture = TestBed.createComponent(ImageUploadComponent);
         component = fixture.componentInstance;
     });
 }));
开发者ID:vfcosta,项目名称:angular-theme,代码行数:13,代码来源:image-upload.component.spec.ts

示例7: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       ReactiveFormsModule,
       TranslateModule.forRoot(),
       IonicStorageModule.forRoot(),
       RouterTestingModule.withRoutes([])
     ],
     declarations: [SignupPage],
     schemas: [CUSTOM_ELEMENTS_SCHEMA],
     providers: [HttpClient, HttpHandler, HTTP, Network, GooglePlus]
   }).compileComponents();
 }));
开发者ID:strandls,项目名称:biodiv-mobile,代码行数:13,代码来源:signup.page.spec.ts

示例8: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     declarations: [QuizzesComponent,
       MockQuizConfigurationComponent,
       MockQuizGameComponent],
     imports: [
       TranslateModule.forRoot({
         loader: { provide: TranslateLoader, useClass: FakeLoader },
       })
     ]
   })
     .compileComponents();
 }));
开发者ID:mchaffotte,项目名称:geo-application,代码行数:13,代码来源:quizzes.component.spec.ts

示例9: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [ ReactiveFormsModule,
        TranslateModule.forRoot({loader: {provide: TranslateLoader, useClass: TranslateFakeLoader}})],
      // providers: [ {provide: TranslateService, use: FakeTranslateService}]
      // imports: [TranslateModule.forRoot()], providers: []
      providers: [ { provide: LoginService, use: loginServiceStub } ]
    });

    injector = getTestBed();
    // translate = injector.get(TranslateService);

  });
开发者ID:PloughingAByteField,项目名称:tiatus,代码行数:13,代码来源:login.component.spec.ts

示例10: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       NgbModule.forRoot(),
       RouterTestingModule,
       TranslateModule.forRoot(),
       ReactiveFormsModule,
       CoreModule
     ],
     declarations: [LoginComponent]
   })
   .compileComponents();
 }));
开发者ID:yume117,项目名称:starter-kit,代码行数:13,代码来源:login.component.spec.ts


注:本文中的@ngx-translate/core.TranslateModule.forRoot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。