@eo-sdk/core library

Use @eo-sdk/core library to create your own custom yuuvis® RAD client application.

Installation

npm install @eo-sdk/core --save

Usage

Import EoCoreModule in your applications root NgModule.

import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {EoCoreModule} from '@eo-sdk/core';

@NgModule({
    imports: [
        BrowserModule,
        EoCoreModule.forRoot()
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }

Apply configuration

By default EoCoreModule is set up with the following configuration

{
  "main": ['assets/_default/config/main.json', 'assets/_default/config/extend.json'],
  "translations": ['assets/_default/i18n/']
}

This tells the module where to find the main config file and where the translations of your application can be found.

If you want to change / override those values, you can provide the modules forRoot() function with your custom config.

@NgModule({
    imports: [
        BrowserModule,
        EoCoreModule.forRoot({
          main: ['assets/_default/config/main.json', 'assets/config/main.json'],
          translations: ['assets/_default/i18n/', 'assets/i18n/']
        })
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }

Main configuration file

You need to provide a main configuration file for setting up the module.

 {
  "uri": {
    "serviceBase": "/rest-ws/service",
    "searchBase": "/search",
    "contextBase": "/structure",
    "inboxBase": "/inboxservice",
    "bpmBase": "/bpm",
    "agentBase": "/agent",
    "statusBase": "/status"
  },
  "search": {
    "searchMode": "idxs",
    "trackTotalHits": false,
    "limit": 50
  },
  "languages": [
    {
      "iso": "de",
      "label": "Deutsch"
    },
    {
      "iso": "en",
      "label": "English",
      "fallback": true
    }
  ]
}

Using translations in other modules than the root module

If you structure your application by using several modules you may want to use translations inside of those modules as well. In order to do so, just import EoSharedModule in your feature module and you are able to use translate directives and services there.

@NgModule({
    imports: [
        EoSharedModule
    ]
})
export class MyFeatureModule { }

License

MIT

results matching ""

    No results matching ""