JGleason
JGleason

Reputation: 3946

What is the MdDialogRef replacement in newer versions of Angular Material?

I have the following code in a project I am working on...

import { MdDialogRef } from '@angular/material';
...
constructor(
    private dialogRef: MdDialogRef<SomeDialogComponent>,
    ...
) {}

The problem is this was using an older version of @angular/material. The newer versions do not allow you to just use @angular/material you have to provide a more robust path. However, when I look through the code to find this it doesn't appear to be in the code anymore and I can't find new documentation to replace the import.

How do I use MdDialogRef in newer versions of @angular/material?

Update

Seems to be a similar case for other Angular material components...

import { MdSnackBar, MdSnackBarRef } from '@angular/material';

Upvotes: 2

Views: 342

Answers (1)

JGleason
JGleason

Reputation: 3946

I figured it out, they changed everything from Md to Mat. This works....

import { MatDialogRef } from '@angular/material/dialog';

Upvotes: 2

Related Questions