title: How to reset the Text field by calling from another template in angular
body: <p>In the bellow picture first one is security question which a drop down, and the second one is the text box which i want to be empty on changing the question
  <a href="https://i.stack.imgur.com/K6gc6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K6gc6.png" alt="enter image description here"></a></p>
  
  <p>But the issue is that they both are different templates they both don't have any link
  I used one controller to put regex between them. which is working fine. but the issue is i can not clear the text box when i change the security question .</p>
  
  <p>Bellow is my drop down template for security question. the template is very big so just but the required part of the template code. <strong>please refer the second part of data-ng-click</strong></p>
  
  <pre><code>&lt;li data-ng-repeat="char in characteristic.getAvailableValues() | filter: {value: searchFilter}"
                          data-ng-class="{violatesCompatibilityRule: characteristic.doesValueViolateCompatibilityRule(char.id)}"&gt;
                          &lt;a id="{{vm.productSpecIdPath}}---{{characteristic.characteristicSpecId}}---{{char.id}}---dropdownitem"
                          role="menuitem"
                          tabindex="-1"
                          href="javascript:void(0)"
                          data-ng-click="vm.selectCharacteristicValue(char.id); $root.securityQuestionRegex=characteristic.getSelectedValues()[0].regularExpression"
                          data-ng-bind="char.value"&gt;
                          &lt;/a&gt;
  </code></pre>
  
  <p>Bellow is the Template for Input Box. <strong>Please look at the ng-change</strong></p>
  
  <pre><code>&lt;input ng-if="characteristic.getDisplayName() == 'Security Answer'"
            type="text"
            placeholder="{{'LABELS.USERDEFINEDCHARACTERISTICS.PLACEHOLDER.TEXT' | translate}}"
            id="{{vm.productSpecIdPath}}---{{characteristic.getUserDefinedCharacteristicId()}}---{{$index}}---input"
            name="{{characteristic.getUserDefinedCharacteristicId()}}-{{$index}}"
            data-ng-model="value.value"
            data-ng-change="value.value=$root.textboxRegexValidation(value.value);"
            data-ng-disabled="characteristic.isReadOnly() || vm.isReserved"             
            data-ng-class="{ isReadOnly: characteristic.isReadOnly(), 'reduced-input-width': characteristic.getTooltipId(), dirty: characteristic.isDirty() }"
            sigma-validation-pattern="{{characteristic.getRegularExpression()}}"/&gt;    
  </code></pre>
  
  <p>Bellow is my part of controller code</p>
  
  <pre><code>        $rootScope.textboxRegexValidation = function (obj: any) {
  
  
          if ($rootScope.securityQuestionRegex) {
              var regEx = new RegExp($rootScope.securityQuestionRegex);
              if (regEx.test(obj)) {
                  return obj;
              } else {
                  return obj.substring(0, obj.length - 1);
              }
          } else {
              return obj;
          }
      }
  </code></pre>