Hoping for your help.
I am getting a blank option for the first time in select box.
HTML:
<div ng-app="DispAngleApp" ng-controller="AppCtrl as app">
<p><select size="1" ng-change="change_val(angle3)" ng-model="angle3" ng-init="angle3='0'">
<option ng-repeat ="option in data" value="{{option.corner1}}, {{option.corner2}}">{{option.name}}</option>
</select></p>
</div>
AngularJS:
var myApp = angular.module('myApp', []);
function AppCtrl($scope) {
$scope.data = [{
id: 0,
corner1: '0',
corner2: '0',
name: '---Выберите ТК---'
},
{
id: 1,
corner1: '0',
corner2: '0',
name: 'ТКР-6(01)'
},
{
id: 2,
corner1: '90',
corner2: '99',
name: 'ТКР-6(02)'
},
{
id: 3,
corner1: '180',
corner2: '270',
name: 'ТКР-6(03)'
}
];
}
How can I fix that problem? Thanks.
EDITED:
Demo of a problem:
http://jsfiddle.net/MTfRD/2203/
I need both values of value option.
UPDATE:http://jsfiddle.net/MTfRD/2227/
Here it is my code. I tried to update chosen value on all fields and turn the image on selected angle and with help of Danny Fardy Jhonston Bermúdez I've fixed the problem, thanks.