Sam Scholefield
Sam Scholefield

Reputation: 1250

@angular/material no exported member 'OverlayContainer'

I'm trying to get custom theming working and everything is ok until I need to style the OverlayContainer for dialogs and modals. When I try to import OverlayContainer as per the documentation and various guides VS Code throws an error:

Module '../node_modules/@angular/material/material"' has no exported member 'OverlayContainer')

I've tried searching through the node_modules folder in case its just in a different directory but it appears not.

What am I missing? Any help appreciated.

app.component.ts

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

package.json

"@angular/material": "^5.0.0-rc.2"

Upvotes: 1

Views: 1981

Answers (1)

Pierre Mallet
Pierre Mallet

Reputation: 7221

You should try :

import {OverlayContainer} from "@angular/cdk/overlay";

all the "material agnostic" features have been moved to cdk repo.

Regards

Upvotes: 2

Related Questions