How to programmatically clear a material design autocomplete in angularjs? -
i have material design autocomplete working correctly. need able clear selected element when button clicked. see element's delete button appears on right has $mdautocomplete.clear()
call need don't know how launch that.
how can capture element , call clear() method? thanks
try set model binded search text empty string:
self.clear = function() { self.searchtext = ''; }
see codepen
Comments
Post a Comment