MCPcopy Index your code
hub / github.com/angular-ui/ui-router / setOptionSelectedStatus

Function setOptionSelectedStatus

test/angular/1.6/angular.js:33440–33450  ·  view source on GitHub ↗
(optionEl, value)

Source from the content-addressed store, hash-verified

33438var noopNgModelController = { $setViewValue: noop, $render: noop };
33439
33440function setOptionSelectedStatus(optionEl, value) {
33441 optionEl.prop('selected', value);
33442 /**
33443 * When unselecting an option, setting the property to null / false should be enough
33444 * However, screenreaders might react to the selected attribute instead, see
33445 * https://github.com/angular/angular.js/issues/14419
33446 * Note: "selected" is a boolean attr and will be removed when the "value" arg in attr() is false
33447 * or null
33448 */
33449 optionEl.attr('selected', value);
33450}
33451
33452/**
33453 * @ngdoc type

Callers 2

angular.jsFile · 0.70
selectPreLinkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected