How to use the @ngx-translate/core.TranslateModule 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 TwanoO67 / ngx-admin-lte / dist / ngx-admin-lte.module.js View on Github external
tasks_box_1.TasksBoxComponent,
                user_box_1.UserBoxComponent,
                component_loader_1.ComponentLoaderComponent,
                // LAYOUTS
                auth_1.LayoutAuthComponent,
                login_component_1.LayoutLoginComponent,
                register_component_1.LayoutRegisterComponent
            ],
            imports: [
                platform_browser_1.BrowserModule,
                forms_1.FormsModule,
                http_1.HttpModule,
                router_1.RouterModule,
                angular2_toaster_1.ToasterModule,
                http_2.HttpClientModule,
                core_2.TranslateModule.forRoot({
                    loader: {
                        provide: core_2.TranslateLoader,
                        useFactory: (HttpLoaderFactory),
                        deps: [http_2.HttpClient]
                    }
                }),
            ],
            exports: [
                safe_html_pipes_1.SafeHtmlPipe,
            ],
            providers: [
                // SERVICES
                user_service_1.UserService,
                menu_service_1.MenuService,
                logo_service_1.LogoService,
                footer_service_1.FooterService,
github Alfresco / alfresco-ng2-components / lib / config / karma-test-shim.js View on Github external
require('zone.js/dist/async-test');
require('zone.js/dist/fake-async-test');

jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000;

var appContext = require.context(".", true, /.spec.ts/);appContext.keys().forEach(appContext);

const TestBed = require('@angular/core/testing').TestBed;
const browser = require('@angular/platform-browser-dynamic/testing');
const NoopAnimationsModule = require('@angular/platform-browser/animations').NoopAnimationsModule;
const CoreModule = require('@alfresco/adf-core').CoreModule;
const AppConfigService = require('@alfresco/adf-core').AppConfigService;
const AppConfigServiceMock = require('@alfresco/adf-core').AppConfigServiceMock;
const TranslationService = require('@alfresco/adf-core').TranslationService;
const TranslationMock = require('@alfresco/adf-core').TranslationMock;
const TranslateModule = require('@ngx-translate/core').TranslateModule;
const CommonModule = require('@angular/common').CommonModule;
const FormsModule = require('@angular/forms').FormsModule;
const ReactiveFormsModule = require('@angular/forms').ReactiveFormsModule;

TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting());

beforeEach(() => {
    TestBed.configureTestingModule({
        imports: [
            NoopAnimationsModule,
            CoreModule,
            TranslateModule,
            CommonModule,
            FormsModule,
            ReactiveFormsModule
        ],
github Alfresco / alfresco-ng2-components / lib / core / karma-test-shim.js View on Github external
require('zone.js/dist/jasmine-patch');
require('zone.js/dist/async-test');
require('zone.js/dist/fake-async-test');

jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;

var appContext = require.context(".", true, /.spec.ts/);appContext.keys().forEach(appContext);

const TestBed = require('@angular/core/testing').TestBed;
const browser = require('@angular/platform-browser-dynamic/testing');
const NoopAnimationsModule = require('@angular/platform-browser/animations').NoopAnimationsModule;
const FormsModule = require('@angular/forms').FormsModule;
const ReactiveFormsModule = require('@angular/forms').ReactiveFormsModule;
const HttpClient = require('@angular/common/http').HttpClient;
const HttpClientModule = require('@angular/common/http').HttpClientModule;
const TranslateModule = require('@ngx-translate/core').TranslateModule;
const TranslateLoader = require('@ngx-translate/core').TranslateLoader;

const DirectiveModule = require('./directives/directive.module').DirectiveModule;
const ContextMenuModule = require('./context-menu/context-menu.module').ContextMenuModule;
const PipeModule = require('./pipes/pipe.module').PipeModule;
const AppConfigModule = require('./app-config/app-config.module').AppConfigModule;
const LogService = require('./services/log.service').LogService;
const TranslateLoaderService = require('./services/translate-loader.service').TranslateLoaderService;

const AppConfigService = require('./app-config/app-config.service').AppConfigService;
const AppConfigServiceMock = require('./mock/app-config.service.mock').AppConfigServiceMock;

const AlfrescoApiServiceMock = require('./mock/alfresco-api.service.mock').AlfrescoApiServiceMock;
const AlfrescoApiService = require('./services/alfresco-api.service').AlfrescoApiService;
const providers = require('./core.module').providers;