为什么加载页面时会出现我的反馈字形?

柱塞-http://plnkr.co/edit/dRtZUoDP0xUwhI3SWVrV?p=preview

的HTML

<div class="row">
  <div class="col-xs-5">
    <div class="form-group" ng-class="{ 'has-success has-feedback' : infoForm.cardExpMonth.$valid }">
      <label class="control-label">Expiration Month</label>
      <div class="right-inner-addon">
        <input type="text" class="form-control" ng-model="newCard.expirationMonth" required cc-exp-month name="cardExpMonth" placeholder="MM" />
        <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
      </div>
    </div>
  </div>
  <div class="col-xs-5">
    <div class="form-group" ng-class="{ 'has-success has-feedback' : infoForm.cardExpYear.$valid }">
      <label class="control-label">Expiration Year</label>
      <div class="right-inner-addon">
        <input type="text" class="form-control" ng-model="newCard.expirationYear" required cc-exp-year name="cardExpYear" placeholder="YY" />
        <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
      </div>
    </div>
  </div>
</div>

最佳答案

只是在图标上使用ng-show的快速解决方法,这够好吗?

<div class="row">
  <div class="col-xs-5">
    <div class="form-group" ng-class="{ 'has-success has-feedback' : infoForm.cardExpMonth.$valid }">
      <label class="control-label">Expiration Month</label>
      <div class="right-inner-addon">
        <input type="text" class="form-control" ng-model="newCard.expirationMonth" required cc-exp-month name="cardExpMonth" placeholder="MM" />
        <span class="glyphicon glyphicon-ok form-control-feedback" ng-show="infoForm.cardExpMonth.$valid" aria-hidden="true"></span>
      </div>
    </div>
  </div>
  <div class="col-xs-5">
    <div class="form-group" ng-class="{ 'has-success has-feedback' : infoForm.cardExpYear.$valid }">
      <label class="control-label">Expiration Year</label>
      <div class="right-inner-addon">
        <input type="text" class="form-control" ng-model="newCard.expirationYear" required cc-exp-year name="cardExpYear" placeholder="YY" />
        <span class="glyphicon glyphicon-ok form-control-feedback" ng-show="infoForm.cardExpYear.$valid" aria-hidden="true"></span>
      </div>
    </div>
  </div>
</div>


http://plnkr.co/edit/kTTzbWX3DlZw5k7u1zOT?p=preview

关于css - 加载时显示的引导反馈字形,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/34037140/

10-09 23:06