0

这是我的 ngcontolller 代码

  $scope.openModalContant = function () {       
      ngDialog.open({
          template: 'myModalContent.html',
          scope: $scope,
          showClose: true,
          closeByDocument: false,
          closeByEscape: false,
          preCloseCallback: function(value) {
              $scope.clearFields($scope.primaryObject)
          return true;
      }
      });

  };

这是我的 html 代码

<script type="text/ng-template" id="myModalContent.html">
<div class="loading-spinner">
    <img ng-if="showLoading()" src="../../Content/images/loadingSpinner.gif" />
</div>

<div class="modal-header pad0">
    <div class="col-lg-4 mrgt15 pad0"><h4 class="modal-title">{{objectName}}</h4></div>
    <button class="btn btn-brand" type="button" ng-click="max()">max</button>
    <button class="btn btn-brand" type="button" ng-click="min()">min</button>
</div>
<div class="modal-body table-responsive">
    <div class="modal-inner list-modal-inner">
        <div class="prefill-wrapper" ng-if="preFillListModel.data.length>0">
            <div class="col-xs-12 col-sm-3 col-lg-2 pad0">
                <label class="control-label">Prefill</label>
            </div>
            <div class="col-xs-12 col-sm-9 col-lg-5 pad0">
                <select class="form-control"
                        ng-options="prefill.id as prefill.name for prefill in preFillListModel.data"
                        ng-model="prefill.id"
                        ng-change="getPrefillById(prefill,primaryObject);">
                    <option value=""> --Select-- </option>
                </select>
            </div>
        </div>
        <div class="clearfix"></div>
        <div class="primary-record-panel">
            <div>
                <div ng-if="showColumns">
                    <div columns column-properties="primaryColumns" column-data="primaryObject">
                    </div>
                </div>
            </div>
            <!-- Mid Content end -->
            <!-- Content End -->
        </div>
    </div>
</div>
<div class="modal-footer">
    <div class="pull-right col-lg-12 pad0">
        <div class="col-lg-3 pad0 mart5"><label>Save as Prefill<input type="checkbox" ng-change="prefillCheckBox(isPreFill)" ng-model="isPreFill"></label></div>
        <div ng-if="isPreFill" class="col-lg-4 mart5"><input type="text" ng-model="prefill.name" class="form-control" /></div>
        <button class="btn btn-brand" type="button" ng-click="save(primaryObject,primaryColumns)">OK</button>
        <button class="btn btn-primary" type="button" ng-click="clearFields(primaryObject)&&closeDailogue()">Cancel</button>

    </div>
</div>

因此,单击最大按钮时,我希望弹出窗口扩展宽度和高度,当我单击最小按钮时,它应该最小为默认高度和宽度,他们有可能这样做吗?

4

1 回答 1

0

您必须使用两个类并在 ng-class 中使用它们。一类需要将宽度和高度设置为 100%,最小按钮默认高度和宽度。

此外,您可以传递一个参数“windowClass”,指定父类的宽度和高度。

于 2016-04-18T07:49:50.877 回答