Reputation: 126
When I try to open an mdDialog from within another mdDialog, something happens on the far left side of the screen (a white panel appears). Should it be possible (by design) to open a nested dialog?
Upvotes: 1
Views: 2144
Reputation: 16917
It's possible.
@Component({
selector: 'app-cmp2',
template: 'cmp2'
})
export class Cmp2 { }
@Component({
selector: 'app-cmp1',
template: 'cmp1<br /><button (click)="openDlg()">open second</button>'
})
export class Cmp1 {
constructor(public mdDialog: MdDialog) { }
public openDlg() {
this.mdDialog.open(Cmp2);
}
}
@Component({
selector: 'material-app',
templateUrl: 'app.component.html'
})
export class AppComponent {
constructor(http: Http, public mdDialog: MdDialog) { }
public openDlg() {
this.mdDialog.open(Cmp1);
}
}
http://plnkr.co/edit/ywuCW8HbsXF7To578mcX?p=preview
Maybe create a plunker to demonstrate your problem..
Recursive opening: http://plnkr.co/edit/XW2VpNvieARV40g77Rps?p=preview
Background overlay just keeps getting darker.. :)
Upvotes: 1