Just clear the scope model value on click event and it should do the trick for you.
<input type="text" ng-model="searchAll" />
<a class="clear" ng-click="searchAll = null">
<span class="glyphicon glyphicon-remove"></span>
</a>
Or if you keep your controller's $scope
function and clear it from there. Make sure you've set your controller correctly.
$scope.clearSearch = function() {
$scope.searchAll = null;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…