How to use ng2-translate - 6 common examples

To help you get started, we’ve selected a few ng2-translate 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 bulktrade / SMSC / modules / admin / src / app / crud-meta-data / crud-meta-grid-data / crud-meta-grid-data.component.spec.ts View on Github external
beforeEach(() => {
        TestBed.configureTestingModule({
            providers: [
                CrudMetaGridDataComponent
            ],
            imports: [
                HttpModule,
                TranslateModule.forRoot()
            ]
        });
    });
github bulktrade / SMSC / modules / admin / src / app / customers / customers-contacts / contacts-delete / contacts-delete.component.spec.ts View on Github external
beforeEach(() => {
        TestBed.configureTestingModule({
            imports: [CustomersModule, RouterTestingModule, TranslateModule.forRoot()],
            providers: [
                APP_PROVIDERS,
                {provide: XHRBackend, useClass: MockBackend},
                {provide: ConfigService, useClass: ConfigServiceMock},
            ]
        });

        componentFixture.fixture = TestBed.createComponent(ContactsDeleteComponent);
        componentFixture.instance = componentFixture.fixture.componentInstance;
        componentFixture.element = componentFixture.fixture.nativeElement;
        componentFixture.debugElement = componentFixture.fixture.debugElement;
    });
github bulktrade / SMSC / modules / admin / src / app / crud-meta-data / crud-meta-form-data / crud-meta-form-data.component.spec.ts View on Github external
beforeEach(() => {
        TestBed.configureTestingModule({
            providers: [
                CrudMetaFormDataComponent
            ],
            imports: [
                HttpModule,
                TranslateModule.forRoot()
            ]
        });
    });
github bulktrade / SMSC / modules / admin / src / app / services / notification-service.spec.ts View on Github external
beforeEach(() => {
        TestBed.configureTestingModule({
            imports: [TranslateModule.forRoot()],
            providers: [NotificationsService, NotificationService]
        });
    });
github bulktrade / SMSC / modules / admin / src / app / customers / customers-view / customers-view.component.spec.ts View on Github external
beforeEach(() => {
        TestBed.configureTestingModule({
            imports: [
                CustomersModule,
                RouterTestingModule,
                TranslateModule.forRoot()
            ],
            providers: [{provide: XHRBackend, useClass: MockBackend}, APP_PROVIDERS]
        });

        componentFixture.fixture = TestBed.createComponent(CustomersViewComponent);
        componentFixture.instance = componentFixture.fixture.componentInstance;
        componentFixture.element = componentFixture.fixture.nativeElement;
        componentFixture.debugElement = componentFixture.fixture.debugElement;
    });
github Educama / Showcase / frontend / src / app / shared / translation / translation.module.ts View on Github external
public static forRoot(): Array {
    return [
      {
        ngModule: TranslationModule,
        providers: [
          {provide: MissingTranslationHandler, useClass: EducamaMissingTranslationHandler},
          TranslationNotifierService
        ]
      },
      TranslateModule.forRoot({
        provide: TranslateLoader,
        useFactory: (createTranslateLoader),
        deps: [Http]
      })
    ];
  }
}

ng2-translate

An implementation of angular translate for Angular 2

MIT
Latest version published 8 years ago

Package Health Score

63 / 100
Full package analysis

Popular ng2-translate functions