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

Function setOptionSelectedStatus

test/angular/1.7/angular.js:34937–34947  ·  view source on GitHub ↗
(optionEl, value)

Source from the content-addressed store, hash-verified

34935var noopNgModelController = { $setViewValue: noop, $render: noop };
34936
34937function setOptionSelectedStatus(optionEl, value) {
34938 optionEl.prop('selected', value);
34939 /**
34940 * When unselecting an option, setting the property to null / false should be enough
34941 * However, screenreaders might react to the selected attribute instead, see
34942 * https://github.com/angular/angular.js/issues/14419
34943 * Note: "selected" is a boolean attr and will be removed when the "value" arg in attr() is false
34944 * or null
34945 */
34946 optionEl.attr('selected', value);
34947}
34948
34949/**
34950 * @ngdoc type

Callers 2

angular.jsFile · 0.70
selectPreLinkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected