title: Clear input text AngularJS
body: <p>I am using Glyphicon icon in my input controls once it finds some error. Glyphicon icon has both error and correct images on it. But I want to clear that input control on clicking of error glyphicon.
  below is my code:</p>
  
  <pre><code> &lt;div class="{{layout=='horizontal'? fieldClass || 'col-lg-9':''}} "&gt;
          &lt;div style="position:relative" class="input-group"&gt;
              &lt;span class="input-group-addon"&gt;&lt;b&gt;PD&lt;/b&gt;&lt;/span&gt;
              &lt;div class="icon-addo addon-md"&gt;
                  &lt;input type="text" class="form-control {{textboxClass}}" name="textControl" id="textControl" ng-readonly="readonly" ng-required="required"
                         maxlength="10" placeholder="{{placeholder || layout=='inline' ? labelText : ''}}" data-ng-model="vm.value" ng-blur="vm.onBlur()" /&gt;
  
                  &lt;i ng-show="vm.state==1" class="form-control-feedback fa fa-spinner fa-spin" style="width: auto; height:auto; font-size: 25px; top:5px; right:10px"&gt;&lt;/i&gt;
                  &lt;i onclick="clearControl(this,'textControl');" class="form-control-feedback" ng-class="{'glyphicon glyphicon-ok': vm.state==2, 'glyphicon glyphicon-remove': vm.state==3}" style="width: auto; height:auto; font-size: 20px; top:0; right:10px"&gt;&lt;/i&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div ng-show="textForm['textControl'].$error.required &amp;&amp; (submitted || !textForm['textControl'].$pristine)" class="help-block ng-hide"&gt;{{labelText}} is required&lt;/div&gt;
      &lt;/div&gt;&lt;/i&gt;
  </code></pre>
  
  <p>Please help. </p>