每个复选框的特定ID

时间:2016-05-04 02:24:35

标签: html angularjs node.js

我遇到问题,为所选的每个复选框提供唯一ID。我不确定我是否已经正确地做到了。我无法将所选复选框打印到view-attraction.html

全attraction.html

letter not in {'X', 'O'}

attraction.js

    <input type="checkbox" ng-model=a.selected value={{a.attractionName}} name={{a.attractionName}} id={{a.id}}>

视图-attraction.html

            $scope.selectAttraction = function()
            {
                var selected = '';

                for (var i = 0; i < attractions.length; i++) {
                    if(attraction[i].selected){
                            selected += attraction[i].attractionName;
                    }

                }

            };

https://jsfiddle.net/zcm2LLo8/

0 个答案:

没有答案