examples/vendor/angular-selection-model/selection-model.js
function() {
          if(angular.isArray(selectedItemsList)) {
            var ixSmItem = selectedItemsList.indexOf(smItem);
            if(smItem[selectedAttribute]) {
              if(-1 === ixSmItem) {
                selectedItemsList.push(smItem);
              }
            } else {
              if(-1 < ixSmItem) {
                selectedItemsList.splice(ixSmItem, 1);
              }
            }
          }
        }
function() {
          if(angular.isArray(selectedItemsList)) {
            var ixSmItem = selectedItemsList.indexOf(smItem);
            if(smItem[selectedAttribute]) {
              if(-1 === ixSmItem) {
                selectedItemsList.push(smItem);
              }
            } else {
              if(-1 < ixSmItem) {
                selectedItemsList.splice(ixSmItem, 1);
              }
            }
          }
        }
function ( ) { if ( angular . isArray ( selectedItemsList ) ) { var ixSmItem = selectedItemsList . indexOf ( smItem ) ; if ( smItem [ selectedAttribute ] ) { if ( - 1 === ixSmItem ) { selectedItemsList . push ( smItem ) ; } } else { if ( - 1 < ixSmItem ) { selectedItemsList . splice ( ixSmItem , 1 ) ; } } } }
Routine to keep the list of selected items up to date

Adds/removes this item from `selectionModelSelectedItems`.
Routine to keep the list of selected items up to date