當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。