@ngodings/ngx-interceptor
TypeScript icon, indicating that this package has built-in type declarations

15.0.9 • Public • Published

@ngodings/ngx-interceptor

Angular HTTP Interceptor for Error Handling & Header Authorization

Demo - Angular v15

https://npm.ngodings.com/packages/ngx-interceptor

Support Me

If you like this package I will be happy that you support me on Buy me a coffee :)
Buy me coffee: https://www.buymeacoffee.com/alidihaw
Indonesia People: https://sociabuzz.com/dihaw

Getting Started

Installing and Importing

Install the package by command:

 npm install @ngodings/ngx-interceptor --save

Import the module

@NgModule({
    imports: [...],
    declarations: [...],
    providers: [
      ...
      { provide: HTTP_INTERCEPTORS, useClass: NgxHttpHeaderInterceptor, multi: true },
      { provide: HTTP_INTERCEPTORS, useClass: NgxHttpErrorInterceptor, multi: true },
    ]
})
export class AppModule {}

Save token to local storage or session storage with key token

Development

Prepare your environment

  • Install Node.js and NPM
  • Install local dev dependencies: npm install while current directory is this repo

License

MIT @ Ali Abdul Wahid

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @ngodings/ngx-interceptor

    Weekly Downloads

    1

    Version

    15.0.9

    License

    MIT

    Unpacked Size

    39.9 kB

    Total Files

    15

    Last publish

    Collaborators

    • alidihaw