ionic list item-radio checked

<div class="list">
                <label class="item item-radio" ng-repeat="k in kprs" ng-click="isDefaultKpr(k)">
                    <input type="radio" name="group" ng-model="k.IS_MR" value="1">
                    <div class="item-content">
                        {{k.NAME}}-{{k.IS_MR}}
                    </div>
                    <i class="radio-icon ion-checkmark"></i>
                </label>
            </div>

ng-model="k.IS_MR" 的值为1表示要选中当前的.

        $scope.isDefaultKpr = function(k){
            var params = [k._ID];

            KprModel.setDefaultKpr(params).then(function(res){
                KprModel.all().then(function(kprs){
                    $scope.kprs = kprs;
                });
            });
        };

 

posted @ 2015-08-25 22:08  yshy  阅读(2038)  评论(0编辑  收藏  举报