当使用ng-if时,是会把默认作用域删除的,当其为true时,只是增加了其界面元素,为最原始状态,控制器在其上是不起作用的,要想获取ng-if中的值,可以用$scope.$$childTail.layername。

<div ng-if="serviceVirson!=1" class="form-inline">
        <label style="color:red">*</label><label class="modal-message">名称 :</label>
        <input required class="form-control sys_input" type="text"  ng-model="layername" placeholder="" maxlength="15"/>
    </div>

  

相关文章:

  • 2022-01-11
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
  • 2022-02-11
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案