Browse Source

Merge pull request #5432 from abpframework/feat/5428

feat: provide ApiInterceptor in root and useExisting in CoreModule
pull/5439/head
Bunyamin Coskuner 6 years ago
committed by GitHub
parent
commit
3f4921930a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      npm/ng-packs/packages/core/src/lib/core.module.ts
  2. 4
      npm/ng-packs/packages/core/src/lib/interceptors/api.interceptor.ts

2
npm/ng-packs/packages/core/src/lib/core.module.ts

@ -187,7 +187,7 @@ export class CoreModule {
},
{
provide: HTTP_INTERCEPTORS,
useClass: ApiInterceptor,
useExisting: ApiInterceptor,
multi: true,
},
{

4
npm/ng-packs/packages/core/src/lib/interceptors/api.interceptor.ts

@ -6,7 +6,9 @@ import { SessionState } from '../states';
import { StartLoader, StopLoader } from '../actions/loader.actions';
import { finalize } from 'rxjs/operators';
@Injectable()
@Injectable({
providedIn: 'root',
})
export class ApiInterceptor implements HttpInterceptor {
constructor(private oAuthService: OAuthService, private store: Store) {}

Loading…
Cancel
Save