[英]angularJs Radio button not visible?
Hi I'm creating an angularJs App. 嗨,我正在创建一个angularJs应用。 The forms work fine but the radio buttons won't appear.
表格工作正常,但单选按钮不会出现。 All I can see the labels but not the actual buttons.
我只能看到标签,但看不到实际的按钮。 I've followed instructions online but it seems to be hidden.
我已按照在线说明进行操作,但似乎已隐藏。 I'm trying to create a set of 6 radio buttons where the user has to choose only one button.
我正在尝试创建一组6个单选按钮,用户只需选择一个按钮即可。
The below is one of the form partials. 以下是部分形式之一。
Thanks 谢谢
<div>
<div class="form-wrapper">
<p>Choose a fund</p>
<br>
To help you decide which fund is right for you, we've provided a summary of each below.
<br>
Simply click on the magnifying glass to view the individual fund details.
<br>
You can also compare all funds in this risk category using the fund comparison button at the bottom.
<br>
When you've reviewed your options and have made your choice, click 'select'.
<br>
<br>
<!-- <form class="form-horizontal" role="form">-->
<!-- <div class=" form-group">-->
<!-- <div class="col-sm-6">-->
<!-- <div class="form-group">-->
<label for="pearRadio">SEI Balanced Fund</label>
<input id="pearRadio" type="radio" ng-model="fruitValue" value="pear" /><br />
<label for="peachRadio">7IM AAP Balanced Acc Strategy</label>
<input id="peachRadio" type="radio" ng-model="fruitValue" value="peach" /><br />
<label for="apricotRadio">Close Balanced Portfolio Fund Accumulation</label>
<input id="apricotRadio" type="radio" ng-model="fruitValue" value="apricot" /><br />
<label for="pearRadio">Allianz RiskMaster Moderate</label>
<input id="pearRadio" type="radio" ng-model="fruitValue" value="pear" /><br />
<label for="peachRadio">Schroder MM Diversity Balanced Fund Accumulation</label>
<input id="peachRadio" type="radio" ng-model="fruitValue" value="peach" /><br />
<label for="apricotRadio">Goldman Sachs Dynamic</label>
<input id="apricotRadio" type="radio" ng-model="fruitValue" value="apricot" /><br />
<br />
<strong>Selected Fund:</strong> {{fruitValue}}
</div>
<button class="btn btn-primary"
ng-click="goToNextState('form.account')">Next</button>
</form>
</div>
</div>
First of all, do not repeat values if you want that a user choose only one radio button. 首先,如果希望用户仅选择一个单选按钮,则不要重复值。
Check the .form-wrapper class css properties, maybe input opacity is 0 or display none... 检查.form-wrapper类的CSS属性,也许输入的不透明度为0或不显示任何信息...
I made a demo based on your code and works fine: 我根据您的代码制作了一个演示 ,效果很好:
<input id="pearRadio1" type="radio" ng-model="fruitValue" value="pear1" />
I made some changes on the values. 我对值进行了一些更改。
DEMO: http://jsfiddle.net/ba80g13e/ 演示: http : //jsfiddle.net/ba80g13e/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.