I have a simple Javascript Array like this:
var directionArray = [{ id: 'N', text: 'North' },
{ id: 'S', text: 'South' },
{ id: 'E', text: 'East' },
{ id: 'W', text: 'West' }];
I have a select element like this:
<select data-ng-model="bbInventory.DIRECTION_OF_TRAVEL"
name="travelDirection"
id="travelDirection"
class="form-control" style="width: 100%"></select>
The goal is to firstly load the options from the array and then select a value once data is available.
I am drawing a blank, any input will be much appreciated
ng-optionsto populate the<select>.