我正试图在coffeescript中显示一个radiobutton列表,如下所示:
label(ng-repeat="p in priorities")
input(type="radio" ng-model="goal.priorityScore" value="p")
优先顺序是:
$scope.priorities=['Hi','Med','Lo']
然而,优先级显示一堆单选按钮,但每个按钮后没有优先级文本?
答案 0 :(得分:0)
更新您的代码
label(ng-repeat="p in priorities")
input(type="radio" ng-model="goal.priorityScore" value="p")
要
label(ng-repeat="p in priorities")
input(type="radio" ng-model="goal.priorityScore" value="{{p}}")
或者
label(ng-repeat="p in priorities")
input(type="radio" ng-model="goal.priorityScore" value="{{p}}") {{p}}`
希望它有效