1.0.3 • Published 7 months ago

@jswork/nprogress-interceptor v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

nprogress-interceptor

NPorgress interceptor for nx.$api.

version license size download

installation

npm install @jswork/nprogress-interceptor

usage

  1. import css/js:
<link rel="stylesheet" href="https://unpkg.com/nprogress@0.2.0/nprogress.css" />
<script src="https://unpkg.com/nprogress@0.2.0/nprogress.js"></script>
  1. Use with nx.$api:
import createLoaingIntercepotrs from '@jswork/nprogress-interceptor';

const loadingIntercepotrs = createLoaingIntercepotrs();

const opts = {
  adapter: 'Axios',
  slim: true,
  interceptors: [...interceptorRequest, ...interceptorResponse, ...loadingIntercepotrs],
  transformResponse(inResponse) {
    return inResponse.data;
  },
};

nx.$api = httpSchema(schema, opts);

license

Code released under the MIT license.

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago