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

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -