Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/app/loading/loading.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import {SkipLoading} from "./skip-loading.component";

export const loadingInterceptor: HttpInterceptorFn = (req: HttpRequest<unknown>, next: HttpHandlerFn) => {

const loadingService = inject(LoadingService);

// Check for a custom attribute to avoid showing loading spinner
if (req.context.get(SkipLoading)) {
// Pass the request directly to the next handler
return next(req);
}


const loadingService = inject(LoadingService);

// Turn on the loading spinner
loadingService.loadingOn();

Expand Down