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中的禁用按钮

        Disable Button in Angular 2(Angular 2中的禁用按钮)

              <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中的禁用按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Fetch multiple links inside foreach loop(在 foreach 循环中获取多个链接)
                  Backbone Fetch Request is OPTIONS method(Backbone Fetch Request 是 OPTIONS 方法)
                  Fetch API leaks memory in Chrome(Fetch API 在 Chrome 中泄漏内存)
                  How can I download and save a file using the Fetch API? (Node.js)(如何使用 Fetch API 下载和保存文件?(Node.js))
                  Send blob data to node using fetch, multer, express(使用 fetch、multer、express 将 blob 数据发送到节点)
                  Sending a custom User-Agent string along with my headers (fetch)(发送自定义用户代理字符串以及我的标头(获取))

                      <tbody id='hA7ui'></tbody>

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

                    • <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>