【问题标题】:Check CheckBox if inputbox has content and viceversa in Angular如果输入框有内容,则检查 CheckBox,反之亦然
【发布时间】:2022-08-16 15:22:04
【问题描述】:

如果输入框有内容,我想检查复选框,如果输入框没有任何内容,则应取消选中。

    标签: html angular typescript


    【解决方案1】:

    在您的复选框上,[checked]="inputValue" 其中 inputValue 是绑定到您的 inputBox 的变量。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-06-23
      • 2020-07-25
      • 2018-11-30
      • 1970-01-01
      • 1970-01-01
      • 2014-07-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多