移动端 ionic angularjs列表和单选以及多选框混合使用问题

第一次使用ionic,需要展现一个列表,列表下面是输入框或者多选、单选。就是一张问卷

想的是先展现题目列表,每个题目里面嵌套多选、单选或者输入框,结果不行。不知道是什么原因,是列表禁用了点击功能还是什么(如有知道的,请给小弟解惑啊)?

代码:

<html>
	<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <style type="text/css">
    body {
      cursor: url('http://www.runoob.com/try/demo_source/finger.png'), auto;
    }
    </style>
  </head>
	<body>
		<ion-header-bar class="bar-positive">
	      <div class="buttons"><button class="button" ng-click="modalCancel()">返回</button></div>
      	<h1 class="title">{{sfs.name}}</h1>
      	<div class="buttons"><button class="button" ng-click="modalConfirm()" style="text-align: left;" ng-disabled="">提交</button></div>
    	</ion-header-bar>
    	<ion-content>


    		<div class="list">
                <div ng-repeat="item in sfs.surveyItems" style="overflow: auto;" class="item item-button-right">


                    <h2 class="calm" style="margin-bottom:10px;font-size:14px;">
	                    <div class="item item-divider"> 
			          		{{$index+1}}、{{item.itemName}}
							<span ng-if="item.answerType==1">(单选)</span>
							<span ng-if="item.answerType==2">(多选)</span>
							<span ng-if="item.answerType==3">(问答)</span>
			       	 	</div>
                    </h2>
                    <div ng-if="item.answerType==1">
						<ion-radio ng-repeat="answer in item.answers" ng-value="answer.num" ng-click="radioAnswer(item,answer,$event)">{{answer.answer}}</ion-radio>
					</div>
					<div ng-if="item.answerType==2">
						<ion-checkbox ng-repeat="answer in item.answers" ng-click="checkAnswer(item,answer,$event)">{{answer.answer}}</ion-checkbox>
					</div>
					<div ng-if="item.answerType==3">
						<label class="item item-input">
          					<textarea placeholder="最长100个字符" maxlength="100" ng-keyup="disparkAnswer(item,$event)"></textarea>
        				</label>
					</div>
                </div>
            </div>
    	</ion-content>
	</body>
</html>


标红的2行红色是现在的,效果可以点击



最开始用的是

<ion-list show-delete="data.showDelete" show-reorder="data.showReorder">

        <ion-item ng-repeat="item in items" 
                  item="item"
                  href="#/item/{{item.id}}" class="item-remove-animate">
          Item {{ item.id }}
这个就无法点击勾选



如有知道原因的还望告知


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值