2017-04-19 4 views

答えて

0

可能です。

@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

たぶん...あなたの問題を実証するplunkerを作成

再帰開口部:http://plnkr.co/edit/XW2VpNvieARV40g77Rps?p=preview

背景オーバーレイがちょうど暗くなって続けて.. :)

関連する問題