How to use the angular-l10n.LocaleValidationModule.forRoot function in angular-l10n

To help you get started, we’ve selected a few angular-l10n 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 eclipsesource / jsonforms / packages / angular-material / example / app / app.module.ts View on Github external
import { Actions, JsonFormsState, UISchemaTester } from '@jsonforms/core';
import { LocaleValidationModule, TranslationModule } from 'angular-l10n';
import { AppComponent } from './app.component';
import { JsonFormsAngularMaterialModule } from '../../src/module';

import { initialState, rootReducer } from './store';
import { ReduxComponent } from './redux.component';
import logger from 'redux-logger';

@NgModule({
  declarations: [AppComponent, ReduxComponent],
  imports: [
    BrowserModule,
    JsonFormsAngularMaterialModule,
    TranslationModule.forRoot({}),
    LocaleValidationModule.forRoot()
  ],
  bootstrap: [AppComponent],
  schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class AppModule {
  constructor(ngRedux: NgRedux, devTools: DevToolsExtension) {
    let enhancers: any[] = [];
    // ... add whatever other enhancers you want.

    // You probably only want to expose this tool in devMode.
    if (isDevMode() && devTools.isEnabled()) {
      enhancers = [...enhancers, devTools.enhancer()];
    }

    ngRedux.configureStore(rootReducer, initialState, [logger], enhancers);
    const example = initialState.examples.data[0];
github eclipsesource / jsonforms / packages / ionic / src / json-forms.module.ts View on Github external
GroupLayoutRenderer,

    // ListWithDetail components
    ListWithDetailControl,
    MasterPage,
    DetailPage,

    // other
    LabelRenderer
  ],
  imports: [
    IonicModule,
    IonicSelectableModule,
    JsonFormsModule,
    LocalizationModule,
    LocaleValidationModule.forRoot(),
    TranslationModule.forRoot(emptyL10NConfig)
  ],
  exports: [
    IonicModule,
    IonicSelectableModule,
    JsonFormsModule,
    LocalizationModule,
    LocaleValidationModule,
    TranslationModule
  ],
  entryComponents: [
    // controls
    BooleanCheckboxControlRenderer,
    BooleanToggleControlRenderer,
    StringControlRenderer,
    MultilineControlRenderer,