@next-level-integration/list-errors
TypeScript icon, indicating that this package has built-in type declarations

10.0.8-beta • Public • Published

Nli List Errors

This library display error messages in side navigation bar. It contain two components:

  1. header error - an icon with number of errors which will show in ui, user can click on it to open/close the sidenav bar.
    <nli-header-error></ nli-header-error> 
    
  2. list errors - a sidenav bar to show user a list of error message, with delete button.
    <nli-list-errors></ nli-list-errors> 
    

How to use

  1. This library contain its own data model, please double check the data model from server is same as error.model.ts
  2. This library contain its own translation, which use ngx-translate. Translation json are located in assets folder.
    1. after build this library make sure the assets folder also copy to the dist folder.
    2. after npm publish, please make sure the main project which will import this lib, able to support multiple translate http loader. Without support multi loader, the translation for this library will not work, and it might clash to your main project translation
         export function HttpLoaderFactory(http: HttpClient) {
           return new MultiHttpTranslateLoader(http, [
             {prefix: "./assets/i18n/", suffix: ".json"},
             {prefix: "./lib/list-errors/assets/i18n/", suffix: ".json"},
           ]);
         }
      
    3. After npm install this lib in your main project, then add below configuration into angular.json assets path.
      "assets": [
           "src/assets",
           ......
           .....
           ...
           {
             "glob": "**/*",
             "input": "./node_modules/@next-level-integration/list-errors/assets",
             "output": "./lib/list-errors/assets/"
           }
         ],
      
    4. then the translation will work as expected in the list-errors components. Above point 1, 1st prefix map is actually refer to point 2 output folder.

Package Sidebar

Install

npm i @next-level-integration/list-errors

Weekly Downloads

167

Version

10.0.8-beta

License

none

Unpacked Size

261 kB

Total Files

44

Last publish

Collaborators

  • mkorsch-nli
  • sdtyn
  • mzimmermann
  • ykh
  • yousof56
  • hashemnik
  • albertarvato
  • kohl077
  • nagendra.donthi
  • echeah
  • sbienert