2017-04-27 6 views
2

mdldialogserviceスクロール内容:私は、ヘルプコンテンツの多くを持っている場合今Angular2私は私の自宅のコンポーネントからヘルプダイアログを開くためにMdlDialogServiceを使用しています

<app-home></app-home> 
<dialog-outlet></dialog-outlet> 

openHelpDialog(){ 

    this.dialogService.showCustomDialog({ 
     component: HelpComponent, 
     animate: true, 
     isModal: true, 
     styles: {'width': '500px', 'overflow-y':'scroll'}, 
     clickOutsideToClose: true 

    }) 
} 

そして、私のアプリのコンポーネントにその後、モーダル高さは、単純にチョップされる:

enter image description here

高さを特定の%に制限してからスクロールして内容を確認するにはどうすればよいですか?

答えて

0

私は、次のようなスタイルでの最大の高さを追加しました:

this.dialogService.showCustomDialog({ 
     component: HelpComponent, 
     animate: true, 
     isModal: true, 
     styles: {'width': '500px', 'max-height':'500px' ,'overflow-y':'scroll'}, 
     clickOutsideToClose: true 

    }) 
関連する問題