我在这里做错了什么?js小提琴:http: //jsfiddle.net/A2qCS/4/
<div data-ng-controller="PostsController">
<label data-ng-repeat="option in options" >
<input type="radio" data-ng-modal= "options.text" data-ng-value="{{option.text}}" />{{option.text}}
<br/>
</label>
</div>
控制器:
var demoApp = angular.module('demoApp', []);
demoApp.controller('PostsController', function($scope, $http) {
$scope.options = [{ text: '1 Year Americas Best Support for Students' },
{ text: '2 Year Americas Best Support for Students' },
{ text: '3 Year Americas Best Support for Students' }
];
$scope.defaultOption = '1 Year Americas Best Support for Students';
$scope.newValue = function(value) {
console.log(value);
};
});