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
The answer provided by haste doesn't work:
var cb = element[0].getElementsByClassName('some-selector')[0];
var event = new MouseEvent('mousedown', {
'view': window,
'bubbles': true,
'cancelable': true
});
cb.dispatchEvent(event);
I use more simple method:
var cb = element[0].getElementsByClassName('some-selector')[0];
angular.element(cb).triggerHandler('click');