คำถามติดแท็ก radio

7
AngularJS - ผูกปุ่มเรดิโอกับรุ่นที่มีค่าบูลีน
ฉันมีปัญหาผูกปุ่มเรดิโอกับวัตถุที่คุณสมบัติมีค่าบูลีน ฉันพยายามแสดงคำถามการสอบที่ดึงมาจากทรัพยากร $ HTML: <label data-ng-repeat="choice in question.choices"> <input type="radio" name="response" data-ng-model="choice.isUserAnswer" value="true" /> {{choice.text}} </label> JS: $scope.question = { questionText: "This is a test question.", choices: [{ id: 1, text: "Choice 1", isUserAnswer: false }, { id: 2, text: "Choice 2", isUserAnswer: true }, { id: 3, text: "Choice …
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.