Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { ErrorHandler } from '@angular/core';
- @Injectable()
- export class GlobalErrorHandler implements ErrorHandler {
- handleError(error: any): void {
- const chunkFailedMessage = /Loading chunk [\d]+ failed/;
- if (chunkFailedMessage.test(err.message)) {
- window.location.reload();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement