115
rated 0 times
[
118]
[
3]
/ answers: 1 / hits: 29690
/ 10 Years ago, wed, september 3, 2014, 12:00:00
I have a simple JavaScript object that looks like this:
$scope.obj = { 'Architect': [asdf,d,e,y]};
I'd like to show the values of 'Architect'
in a select box. However, the single quotes are throwing me off when trying to do the ng-repeat
.
<select>
<option ng-repeat=row in obj['Architect'] value={{row}}>{{row}}</option>
</select>
That does not populate the select box, it just shows an empty select box. I assume it is interpreting the single quotes as a string literal, but even if I add single quotes and escape them, it still doesn't work as expected. Am I missing something?
More From » angularjs