Does anyone know if it is possible to open a select programmatically in angularjs. Ive tried
angular.element(el).trigger(\'focus\'); angular.element(el).trig
try this
function openSelect(selectId) { var event = new MouseEvent('mousedown', { 'view': window, 'bubbles': true, 'cancelable': true }); var cb = document.getElementById(selectId); cb.size=4; cb.dispatchEvent(event); } openSelect("testId");
or read more here Triggering built-in events