gpt4 book ai didi

javascript - 无法在字符串 'selected' 上创建属性 'Information Technology' angularjs

转载 作者:行者123 更新时间:2023-12-02 14:12:10 25 4
gpt4 key购买 nike

This is my controller

 $scope.subjects = ["Computer Security", "Graphics and Multimedia", "Networks", "Computer Science and Engineering", "Game Design", "Programming", "Information Technology", "Software Engineering", "Technology Management", "Telecommunications", "Web Development", "Sociology", "Psychology", "General", "Social Work", "Criminal Justice", "Law and Paralegal", "Public Safety", "Forensic Sciences", "Counseling", "Homeland Security", "Political Science", "Public Administration"];

This is my view where i am binding data

 <label class="concentration-label3" ng-repeat="value in subjects">
<input ng-model="value.selected" ng-disabled="subjectCheckedCount == subjectLimit && !value.selected" type="checkbox" name="concentrations" class="concentration-label3__input js-concentration-value" value="{{value}}" data-mixpanel-subject="Design" >
<span class="concentration-label3__title" for="conc1">
{{value}}
<span class="concentration-label3__title__checkmark4"></span>
</span>
</label>

Its giving me the error that 'cannot bind property selected to string xyz' Please help!!!

最佳答案

subjects 是一个字符串数组,它没有您尝试绑定(bind)到输入的属性 selected

关于javascript - 无法在字符串 'selected' 上创建属性 'Information Technology' angularjs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39437597/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com