0

I am using ng-dialog to display the popup. The problem i am facing with ng-dialog is there is no vertical scroll bar on the dialog box when the message is huge but scroll bar appearing for the entire html page.

Is there a way i can bring the scroll bar on the ng-dialog box.

I am using the ngdialog.js from https://github.com/likeastore/ngDialog

I googled my best but not getting any idea about how to bring the scrollbar. Please i am just bigger in the css.

below is the code which i am using to bring the popup.

ngDialog.open({ template: 'resources/views/popup.html', className: 'ngdialog-theme-default' , scope: $scope });

any suggestion much appreciated.

mike
  • 377
  • 1
  • 9
  • 22

1 Answers1

0

You should set overflow-y: scroll; on your content element within your dialog template.

HTML:

<div class="modal-content">
<ul class="list-group">
    <li class="list-group-item" ng-repeat="item in items">{{::item.name}}</li>
</ul>

LESS:

.modal-content {
    .choose-modal-content {
        height: 100%;
        width: 100%;

        ul {
            &.list-group {
                overflow-y: scroll;
            }
        }
    }
}

This way the ul will be scrollable when the content overflows.

aup
  • 800
  • 7
  • 19