nz-ng2-interceptors
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

nz-ng2-interceptors

Build Status codecov

About

This package contains recommended interceptors to use in your app.

Installation

npm install nz-ng2-interceptors --save

in your module add the interceptors you need

@NgModule({
    imports: [
        CsrfModule.withOptions(),
        TokenAuthenticationModule.withOptions({
          tokenStoredIn: TokenStorages.cookies,
          tokenKeyName: environment.tokenCookieName
        }),
        DecorateRequestModule.withOptions({
          params: {format: 'json'},
          headers: {
            'Content-Type': 'application/json'
          },
          url: environment.serverUrl
        }),
    ]
})

License

MIT

Package Sidebar

Install

npm i nz-ng2-interceptors

Weekly Downloads

3

Version

0.0.11

License

MIT

Last publish

Collaborators

  • ywarezk