我只是想设置对话框的宽度,我还没有成功(还).我添加了一个CSS类,但宽度设置是对话框阴影之一.
- .dialogwidth800 {
- width : 800px;
- }
- ...
- ngDialog.openConfirm({
- template: 'templateRemove',className: 'ngdialog-theme-default dialogwidth800',scope: $scope
- }).then(
编辑:小提琴在这里纠正了工作解决方案:https://jsfiddle.net/jr626fww/8/
它可以通过使用如下的自定义css轻松实现:
- .ngdialog.ngdialog-theme-default.custom-width-800 .ngdialog-content {
- width: 800px;
- }
- .ngdialog.ngdialog-theme-default.custom-width-900 .ngdialog-content {
- width: 900px;
- }
打开ngDialog时使用这些css类:
要使用custom-width-900
- ngDialog.openConfirm({
- template: 'templateRemove',className: 'ngdialog-theme-default custom-width-800',scope: $scope
- });
要使用custom-width-900
- ngDialog.openConfirm({
- template: 'templateRemove',className: 'ngdialog-theme-default custom-width-900',scope: $scope
- });