Angular JS : ng-option add “string:” prefix int the option value

Below is my select with ng-options:

<select ng-options="key as value for (key , value) in getList() ..."> </select>

The getList() function retrieves the following object:


and if I inspect the generated options, it is the following:

<option label="test1" value="string:CURRENT_ACCOUNT" selected="selected">test1</option>

As you can see, everything seems right except the value attribute has a string: prefix.

How can I remove the prefix? What did I do wrong?

#angular.js #forms

4.65 GEEK