I am trying to do the following:
- Show a simple Yes/No dropdown (with values true and false as IDs) using Select2
- Bind the value of the dropdown to a model using ngModel
- Enable/Disable a textbox using the true/false value
I have a regular example with a checkbox which works, and a select2 example.
The difference is that I am binding the select2 dropdown with an array of values. And the JSON seems to reflect a datatype of string associated with the true/false values, i.e. they are bound as strings "true" and "false".
EDIT: I realize that tag values can only be strings. Thus, see my answer.