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

Function selectionChanged

test/angular/1.3/angular.js:25990–26007  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25988 }
25989
25990 function selectionChanged() {
25991 scope.$apply(function() {
25992 var collection = valuesFn(scope) || [];
25993 var viewValue;
25994 if (multiple) {
25995 viewValue = [];
25996 forEach(selectElement.val(), function(selectedKey) {
25997 selectedKey = trackFn ? trackKeysCache[selectedKey] : selectedKey;
25998 viewValue.push(getViewValue(selectedKey, collection[selectedKey]));
25999 });
26000 } else {
26001 var selectedKey = trackFn ? trackKeysCache[selectElement.val()] : selectElement.val();
26002 viewValue = getViewValue(selectedKey, collection[selectedKey]);
26003 }
26004 ctrl.$setViewValue(viewValue);
26005 render();
26006 });
26007 }
26008
26009 function getViewValue(key, value) {
26010 if (key === '?') {

Callers

nothing calls this directly

Calls 3

getViewValueFunction · 0.85
forEachFunction · 0.70
renderFunction · 0.70

Tested by

no test coverage detected