AngularJS: Empty - latest CI build
by vojtajina
HTML
<script src="http://code.angularjs.org/1.0.0rc3/angular-1.0.0rc3.js"></script>
<div ng-app ng-controller="TestCtrl">
<h4>{DESTINATION}</h4>
<label ng-repeat="d in destinations ">
<input type="radio" ng-model="destination.value" ng-value="d.value" />{{d.key}} | {{destination.value == d.value}}
</label>
<hr>
<p>destination.value: {{destination.value}}</p>
<button ng:click="destination.value='bj'">Pick Mendicino</button>
</div>
CSS
label {
display: block;
}
JavaScript
function TestCtrl($scope) {
$scope.destinations = [{
key: 'Los Angeles',
value: 'cj',
checked: true},
{
key: 'San Diego',
value: 'aj',
checked: false},
{
key: 'Mendicino',
value: 'bj',
checked: false}];
$scope.destination = {
value: 'aj'
};
}