<div class="radio">
<label><input type="radio" ng-model="tb3r4" value="0" ng-checked="true">Do not specify</label>
</div>
<div class="radio">
<label><input type="radio" ng-model="tb3r4" value="1">Yes</label>
</div>
<div class="radio">
<label><input type="radio" ng-model="tb3r4" value="2">No</label>
</div>
</div>
现在我正在检查条件
<span ng-if="tb3r4==0">None specified</span>
但这种情况无效
答案 0 :(得分:0)
而不是使用ng-checked。将模型值初始化为0.这应该在您的控制器中完成。
app.controller('MainCtrl', function($scope) {
$scope.tb3r4 = 0;
});
<div class="radio">
<label><input type="radio" ng-model="tb3r4" value="0">Do not specify</label>
</div>