6.2.0 • Published 2 years ago

@premotec/ngx-essentials v6.2.0

Weekly downloads
182
License
-
Repository
-
Last release
2 years ago

#@premotec/ngx-essentials npm version

Table of Contents

##Installation

First you need to install the npm module:

    npm i @premotec/ngx-essentials --save

##Usage

  1. Add NgxEssentials into your SharedModule class. Don't forget to add NgxEssentialsModule to the exports array. Shared.module.ts would look like this:
import {NgModule} from '@angular/core';
import {NgxEssentialsModule} from '@premotec/ngx-essentials/';

@NgModule({
    imports: [NgxEssentialsModule],
    exports: [NgxEssentialsModule]
})
export class SharedModule {
}

Then import SharedModule everywhere you need the LoadingIndicatorComponent or ConfirmationModalComponent.

  1. Provide singleton services and interceptors in your AppModule or CoreModule class. The import of TimeStampInterceptor in your core.module.ts would look like this.
import { NgModule, ModuleWithProviders, Optional, SkipSelf, LOCALE_ID } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HTTP_INTERCEPTORS, HttpClient } from '@angular/common/http';
import { TimeStampInterceptor } from '@premotec/ngx-essentials';

@NgModule({
  imports: [
    CommonModule,
  ]
})
export class CoreModule {
  static forRoot(): ModuleWithProviders {
    return {
      ngModule: CoreModule,
      providers: [
        {
          provide: HTTP_INTERCEPTORS,
          useClass: TimeStampInterceptor,
          multi: true
        },
      ],
    };
  }

  constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
    if (parentModule) {
      throw new Error(
        'CoreModule is already loaded. Import it in the AppModule only');
    }
  }
}

API

TypeNameDescription
ComponentBaseComponentBase component to use that helps handle cleaning up of ressources
ComponentLoadingIndicatorComponentProvides a loading indicator. Just embed into your html template file to use it.
ClassObjectHelperHelper for mapping and navigating on properties.
DirectiveAutoWindowHeightDirectiveDirective to adapt the height of an element to the height of the window.
InterceptorTimeStampInterceptorInterceptor which adds a timestamp to http requests in order to avoid browser caching. Import it to your application as descripted here
ModelWebAppInfoModelModel for WebAppAssembly-API
6.2.0

2 years ago

13.0.0

2 years ago

12.0.0

3 years ago

11.0.1

3 years ago

11.0.0

3 years ago

11.0.0-alpha.9

3 years ago

11.0.0-alpha.8

3 years ago

11.0.0-alpha.6

3 years ago

11.0.0-alpha.7

3 years ago

11.0.0-alpha.5

4 years ago

11.0.0-alpha.4

4 years ago

11.0.0-alpha.2

4 years ago

11.0.0-alpha.3

4 years ago

11.0.0-alpha.1

4 years ago

6.0.6

4 years ago

6.2.0-beta.2

4 years ago

6.2.0-beta.1

4 years ago

6.1.0

4 years ago

6.1.0-beta.6

4 years ago

6.1.0-beta.5

4 years ago

6.1.0-beta.3

4 years ago

6.1.0-beta.4

4 years ago

6.1.0-beta.2

4 years ago

6.1.0-beta.1

4 years ago

6.0.5

5 years ago

6.0.4

5 years ago

6.0.4-alpha.1

5 years ago

6.0.3

5 years ago

6.0.2

5 years ago

6.0.1

5 years ago

6.0.0-alpha.28

6 years ago

6.0.0-alpha.27

6 years ago

6.0.0-alpha.26

6 years ago

6.0.0-alpha.25

6 years ago

6.0.0-alpha.24

6 years ago

6.0.0-alpha.23

6 years ago

6.0.0-alpha.22

6 years ago

6.0.0-alpha.21

6 years ago

6.0.0-alpha.20

6 years ago

6.0.0-alpha.19

6 years ago

6.0.0-alpha.18

6 years ago

6.0.0-alpha.17

6 years ago

6.0.0-alpha.16

6 years ago

6.0.0-alpha.15

6 years ago

6.0.0-alpha.14

6 years ago

6.0.0-alpha.13

6 years ago

6.0.0-alpha.12

6 years ago

6.0.0-alpha.11

6 years ago

6.0.0-alpha.10

6 years ago

6.0.0-alpha.9

6 years ago

6.0.0-alpha.8

6 years ago

6.0.0-alpha.7

6 years ago

6.0.0-alpha.6

6 years ago

6.0.0-alpha.5

6 years ago

6.0.0-alpha.4

6 years ago

6.0.0-alpha.3

6 years ago

6.0.0-alpha.2

6 years ago

6.0.0-alpha.1

6 years ago

1.0.0

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago