angular2 MdDialog is not appearing as a popup

It appears that material2 theming css also contains some functional css and without this overlay doesn't work properly. Material2 getting started guide mentions that theme is required. But its easy to miss this.

Try importing some material theme in styles.css

@import '~@angular/material/core/theming/prebuilt/deeppurple-amber.css';

or

@import "node_modules/@angular/material/core/theming/prebuilt/deeppurple-amber.css";

actual path can be different.