0

Spent a few hours now trying to figure this out, MatSnackBar is working perfectly fine in Chrome but trhows a weird error in IE11.

My setup:

app.shared.module.ts:

import { MatSnackBarModule} from '@angular/material';

my-test.component.ts:

import { MatSnackBar } from '@angular/material';
...
    constructor(
    private snackbar: MatSnackBar,
...
this.snackbar.open('Submitted','Close',
            {
                duration: 3000,
            });

This is fine in Chrome but in IE11 it throws this: enter image description here

tom33pr
  • 853
  • 2
  • 12
  • 30

1 Answers1

0

I solved this by adding

import 'core-js/es7/reflect';

to polyfill.ts