1. <i id='Gg6u9'><tr id='Gg6u9'><dt id='Gg6u9'><q id='Gg6u9'><span id='Gg6u9'><b id='Gg6u9'><form id='Gg6u9'><ins id='Gg6u9'></ins><ul id='Gg6u9'></ul><sub id='Gg6u9'></sub></form><legend id='Gg6u9'></legend><bdo id='Gg6u9'><pre id='Gg6u9'><center id='Gg6u9'></center></pre></bdo></b><th id='Gg6u9'></th></span></q></dt></tr></i><div id='Gg6u9'><tfoot id='Gg6u9'></tfoot><dl id='Gg6u9'><fieldset id='Gg6u9'></fieldset></dl></div>

        <small id='Gg6u9'></small><noframes id='Gg6u9'>

      1. <tfoot id='Gg6u9'></tfoot>
      2. <legend id='Gg6u9'><style id='Gg6u9'><dir id='Gg6u9'><q id='Gg6u9'></q></dir></style></legend>
          <bdo id='Gg6u9'></bdo><ul id='Gg6u9'></ul>

        Angular 2中的禁用按钮

        时间:2023-09-30

              <tbody id='UUMAa'></tbody>
              <bdo id='UUMAa'></bdo><ul id='UUMAa'></ul>

            • <legend id='UUMAa'><style id='UUMAa'><dir id='UUMAa'><q id='UUMAa'></q></dir></style></legend>

            • <i id='UUMAa'><tr id='UUMAa'><dt id='UUMAa'><q id='UUMAa'><span id='UUMAa'><b id='UUMAa'><form id='UUMAa'><ins id='UUMAa'></ins><ul id='UUMAa'></ul><sub id='UUMAa'></sub></form><legend id='UUMAa'></legend><bdo id='UUMAa'><pre id='UUMAa'><center id='UUMAa'></center></pre></bdo></b><th id='UUMAa'></th></span></q></dt></tr></i><div id='UUMAa'><tfoot id='UUMAa'></tfoot><dl id='UUMAa'><fieldset id='UUMAa'></fieldset></dl></div>
            • <tfoot id='UUMAa'></tfoot>
              1. <small id='UUMAa'></small><noframes id='UUMAa'>

                  本文介绍了Angular 2中的禁用按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如果输入合同类型"为空,则保存"按钮不可点击

                  I want if the input 'Contract type' is empty, the button 'Save' is not clickable

                  保存按钮:

                  <div class="col-md-4">
                          <cic-textbox [control]="formGroup.get('contractType')"></cic-textbox>
                        </div>
                  

                  所有按钮:

                   <div class="cic-header-actions pull-left" *ngIf="actions && actions.length > 
                   0">
                        <button class="btn btn-{{action.style}} m-l-xs" *ngFor="let action of actions" ng-disabled="!contractTypeValid" (click)="execute(action)">
                            <cic-icon [icon]="action.icon"></cic-icon>
                            {{action.text }}
                          </button>
                      </div>
                  

                  定义合约类型:

                   let contractType: DataDictionaryPropertyExtended = {
                              Binding: 'VART:BEZEICHNUNG',
                              Label: 'Vertragsart',
                              LabelCols: 4,
                              ContentCols: 8,
                              IsDisabled: this.isDisabled,
                              ValidationProperties: [
                                  <ValidationProperty>{
                                      Type: ValidationType.IsNotEmpty,
                                      ErrorMessage: 'Vertragsart darf nicht leer sein.',
                                  }
                              ]
                          };
                  

                  按钮保存绿色:

                  推荐答案

                  ng-disabled="!contractTypeValid" 改为 [disabled]="!contractTypeValid"

                  这篇关于Angular 2中的禁用按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Vue.js 中如何在父孙之间进行双向数据绑定 下一篇:FB.ui 和设置弹出窗口大小

                  相关文章

                  <legend id='hA7ui'><style id='hA7ui'><dir id='hA7ui'><q id='hA7ui'></q></dir></style></legend>
                1. <small id='hA7ui'></small><noframes id='hA7ui'>

                2. <tfoot id='hA7ui'></tfoot>
                  1. <i id='hA7ui'><tr id='hA7ui'><dt id='hA7ui'><q id='hA7ui'><span id='hA7ui'><b id='hA7ui'><form id='hA7ui'><ins id='hA7ui'></ins><ul id='hA7ui'></ul><sub id='hA7ui'></sub></form><legend id='hA7ui'></legend><bdo id='hA7ui'><pre id='hA7ui'><center id='hA7ui'></center></pre></bdo></b><th id='hA7ui'></th></span></q></dt></tr></i><div id='hA7ui'><tfoot id='hA7ui'></tfoot><dl id='hA7ui'><fieldset id='hA7ui'></fieldset></dl></div>
                    • <bdo id='hA7ui'></bdo><ul id='hA7ui'></ul>