title: Angular js - change value of model in custom directive
body: <p>i m trying to change ng-model value in custom directive but issue is that i have used controller as </p>
  
  <pre><code>&lt;div ng-controller="AreaController as vm"&gt;
  &lt;md-input-container flex="40" class="md-block" on-enter="vm.search()"&gt;
              &lt;label&gt;Search&lt;/label&gt;  
                &lt;md-icon class="material-icons" &gt;search&lt;/md-icon&gt;  
              &lt;input type="text" name="search" ng-model="vm.area.searchText" clear-input="vm.getList()"&gt;
              &lt;/md-input-container&gt; 
  </code></pre>
  
  <p>and in custom directive, i m trying to clear input field by changing ng-model value to '' but i m unable to get value</p>
  
  <pre><code>   var result = scope[attr.ngModel];
                      var r = $parse(attr.ngModel);
  </code></pre>
  
  <p>result is null, how can i fix this issue</p>
  
  <p>any help will be appreciated</p>