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