为了账号安全,请及时绑定邮箱和手机立即绑定

angularJS动态设置ng-model

标签:
JavaScript

         

<div class="form-group" >                               <label class="col-xs-2 control-label col-xs-offset-1"><span class="red">*</span>系统选择</label>                               <div class="col-xs-9">                                   <div class="col-xs-3 pl0" ng-repeat="param in params">                                   <div class="radio c-radio">                                       <label>                                           <input ng-show="ls" type="checkbox" name="radioSys" class="checkSysId radioSys" ng-true-value="`param`.`sysId`" value="`param`.`sysId`"  ng-trim="false"  ng-click="getSysId($parent.conff[$index])" ng-model="$parent.conff[$index]">                                           <span  ng-show="ls" class="fa fa-check"></span>`param`.`sysName`                                       </label>                                   </div>                                   </div>                               </div>                           </div>
                 //点击获取系统ID                    $scope.getSysId = function(t){                        u="";//                        $("#s1 option").remove();//                        $("#s2 option").remove();                        t="";                        for(var prop in $scope.conff){                             if($scope.conff[prop] != false){                                 t+=$scope.conff[prop];                                 t=t+'\,';                                 var k = $scope.conff[prop];                                 var CoreUrl2 = new coreUrl({"transCode":"B000603","sysId":k});                                     CoreUrl2.$save(function(objc){                                         u+=objc.row[0].sysName;                                         u=u+' '                                         $scope.uu = u;                                     });                             }//                             if($scope.conff[prop] != false){//                                 t+=$scope.conff[prop];//                                 t=t+'\,';//                             }                         }                        t = t.substr(0,t.length-1);                        $scope.userSysList = t                    };

利用$index判断获取选中的checkbox


点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
  • 推荐
  • 评论
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消