select

  • function
can.view.bindings.can-value-select  

Cross bind a value to a <select> element.

<select can-value='KEY'/>

Cross binds the selected option value with an observable value.

Parameters

  1. KEY {key}

    A named value in the current scope. KEY's value is cross bound with the selected <option> in the <select>. KEY should specify either a can.Map property or a can.compute.

Use

The following cross bind's a <select> to a person map's attending property: