JSFiddle - React, Tailwind, and code Playground
by yappli
HTML
<script src="http://cdn.yappli.com/js/library/angular/1.2.14/angular.js"></script>
<div ng-app='my.app'>
<div ng-controller="TestCtrl">
<form>
<select ng-model="input.id" ng-options="obj.id as obj.label for obj in objs" required>
<option value="" selected="selected" ng-if="!input.id"></option>
</select>
</form>
<p>This page run <b>Angular.js 1.2.14</b></p>
<p>The select above does have a blank selected value. This this the expected behaviour.</p>
<p>input = <b>{{input | json}}</b></p>
<p>Bug report : <a href="https://github.com/angular/angular.js/issues/6828">#6828</a></p>
<p>This simple case doesn't work with :</p>
<ul>
<li><a href="http://jsfiddle.net/yappli/X8era/20/">Angular 1.2.15 (See the jsfiddle here)</a></li>
<li><a href="http://jsfiddle.net/yappli/X8era/21/">Angular 1.3.0-beta.3 (See the jsfiddle here)</a></li>
</ul>
</div>
</div>
JavaScript
angular.module('test', [])
.controller('TestCtrl', ['$scope', function($scope)
{
$scope.objs = [
{ id: 1, label: "item 1" },
{ id: 2, label: "item 2" },
{ id: 3, label: "item 3" }
];
$scope.input = {};
}]);
angular.module('my.app', ['test']);