How to use the @ngx-translate/core.TranslateModule.forRoot function in @ngx-translate/core

To help you get started, we’ve selected a few @ngx-translate/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github imolorhe / altair / src / app / components / doc-viewer / doc-viewer / doc-viewer.component.spec.ts View on Github external
beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [
        TranslateModule.forRoot(),
        // Just import DocViewerModule since it contains all doc viewer component and dependencies
        DocViewerModule
      ],
      providers: [
        {
          provide: AltairConfig,
          useValue: new AltairConfig(),
        },
      ]
    })
    .compileComponents();
  }));
github yduartep / angular-full-sample / src / app / core / header / header.component.spec.ts View on Github external
beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [HeaderComponent],
      schemas: [NO_ERRORS_SCHEMA],
      imports: [
        TranslateModule.forRoot({
          loader: {
            provide: TranslateLoader,
            useFactory: (createTranslateLoader),
            deps: [HttpClient]
          }
        }),
        SharedModule,
        RouterTestingModule.withRoutes([])
      ],
      providers: [
        {provide: 'LoggerService', useFactory: loggerFactory},
        {provide: 'api.config', useValue: apiConfig},
        {provide: 'AuthService', useClass: OAuthService},
        {provide: 'defaultLanguage', useValue: 'en'},
        SpinnerService,
        AuthHelper
github intershop / intershop-pwa / src / app / pages / search / components / search-result / search-result.component.spec.ts View on Github external
beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [TranslateModule.forRoot()],
      declarations: [
        MockComponent(BreadcrumbComponent),
        MockComponent(FaIconComponent),
        MockComponent(FilterNavigationContainerComponent),
        MockComponent(NgbCollapse),
        MockComponent(ProductListingContainerComponent),
        SearchResultComponent,
      ],
    }).compileComponents();
  }));
github intershop / intershop-pwa / src / app / pages / registration / registration-page.container.spec.ts View on Github external
beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [DummyComponent, MockComponent(RegistrationFormComponent), RegistrationPageContainerComponent],
      providers: [{ provide: AVAILABLE_LOCALES, useValue: defaultLocales }],
      imports: [
        RouterTestingModule.withRoutes([{ path: 'home', component: DummyComponent }]),
        TranslateModule.forRoot(),
        ngrxTesting({ reducers: coreReducers }),
      ],
    }).compileComponents();

    location = TestBed.get(Location);
  }));
github BekirUzun / SelfVPN / src / app / app.module.ts View on Github external
@NgModule({
  declarations: [
    AppComponent,
    WebviewDirective,
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpClientModule,
    AppRoutingModule,
    HomeModule,
    SettingsModule,
    LogDisplayModule,
    DialogModule,
    NavModule,
    TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: (HttpLoaderFactory),
        deps: [HttpClient]
      }
    }),
    NgbModule,
    BrowserAnimationsModule,
    NbThemeModule.forRoot({ name: 'dark' }),
    NbLayoutModule,
    NbEvaIconsModule,
    NbWindowModule.forRoot({
      closeOnBackdropClick: true
    }),
    NbSpinnerModule,
    NbButtonModule,
github intershop / intershop-pwa / src / app / pages / checkout-payment / checkout-payment-page.component.spec.ts View on Github external
beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [
        CheckoutPaymentPageComponent,
        MockComponent(CheckoutPaymentComponent),
        MockComponent(LoadingComponent),
      ],

      imports: [
        TranslateModule.forRoot(),
        ngrxTesting({
          reducers: {
            checkout: combineReducers(checkoutReducers),
            shopping: combineReducers(shoppingReducers),
          },
        }),
      ],
    }).compileComponents();
  }));
github Alfresco / alfresco-ng2-components / ng2-components / ng2-alfresco-core / src / services / alfresco-settings.service.spec.ts View on Github external
beforeEach(async(() => {
        TestBed.configureTestingModule({
            imports: [
                AppConfigModule,
                TranslateModule.forRoot({
                    loader: {
                        provide: TranslateLoader,
                        useClass: AlfrescoTranslateLoader
                    }
                })
            ],
            providers: [
                AlfrescoApiService,
                AlfrescoSettingsService,
                UserPreferencesService,
                StorageService,
                LogService
            ]
        }).compileComponents();
    }));
github bkimminich / juice-shop / frontend / src / app / track-result / track-result.component.spec.ts View on Github external
beforeEach(async(() => {

    TestBed.configureTestingModule({
      imports: [
        TranslateModule.forRoot(),
        RouterTestingModule,
        HttpClientTestingModule,
        MatCardModule,
        MatTableModule
      ],
      declarations: [ TrackResultComponent ],
      providers: [TrackOrderService]
    })
    .compileComponents()
  }))
github burst-apps-team / phoenix / web / angular-wallet / src / app / app.module.ts View on Github external
},
];

@NgModule({
  declarations: [
    AppComponent,
    NewVersionDialogComponent
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    HttpClientModule,
    RouterModule.forRoot(appRoutes,
      {enableTracing: true}),

    TranslateModule.forRoot(),

    MatMomentDateModule,
    MatButtonModule,
    MatIconModule,
    MatDialogModule,
    LoginModule,
    MainModule,
    SetupModule,
    NetworkModule,
    NotifierModule,
    I18nModule,
    DisclaimerModule,
    NgxElectronModule,
    MatCardModule,
    MatTooltipModule,
    MatFormFieldModule,