function checkAndSetSelected(i) {
			if ($ctrl.ngModel === null) {
				return;
			}

			if ($ctrl.ngModel.$modelValue && $ctrl.ngModel.$modelValue[$ctrl.idKey] === $ctrl.options[i][$ctrl.idKey]) {
				$ctrl.selectedIndex = i;
			}
		}
// sets selected index if an option is already selected.
sets selected index if an option is already selected.
sets selected index if an option is already selected .
function checkAndSetSelected(i) {
			if ($ctrl.ngModel === null) {
				return;
			}
			if ($ctrl.ngModel.$modelValue && $ctrl.ngModel.$modelValue[$ctrl.idKey] === $ctrl.options[i][$ctrl.idKey]) {
				$ctrl.selectedIndex = i;
			}
		}
function checkAndSetSelected ( i ) { if ( $ctrl . ngModel === null ) { return ; } if ( $ctrl . ngModel . $modelValue && $ctrl . ngModel . $modelValue [ $ctrl . idKey ] === $ctrl . options [ i ] [ $ctrl . idKey ] ) { $ctrl . selectedIndex = i ; } }
sets selected index if an option is already selected.
sets selected index if an option is already selected .