AngularJS ngRepeat and orderBy.
by Sajeetharan Sinnathurai
HTML
<div ng-app="myApp" ng-controller="ListCtrl">
<div ng-repeat="patient in data.data.data_option ">
<div ng-repeat="detail in patient.options ">
<input type="checkbox">
<span class="done-{{todo.done}}">{{detail}}</span>
</div>
</div>
JavaScript
angular.module('myApp', [])
.controller('ListCtrl', function($scope) {
$scope.data = {
"data": {
"0": {
"id": 2,
"survey_id": 14,
"question": "What's here?",
"question_type": 2,
"created_at": "2016-07-15 18:29:05",
"updated_at": "2016-07-15 18:29:05",
"deleted_at": null,
"type": "checkbox",
"ques_options_id": 2,
"key": "pqr",
"value": "PQR",
"survey_user_id": 39
},
"1": {
"id": 9,
"survey_id": 14,
"question": "Whats demo? ",
"question_type": 4,
"created_at": "2016-07-15 18:29:05",
"updated_at": "2016-07-15 18:29:05",
"deleted_at": null,
"type": "dropdown",
"ques_options_id": 9,
"key": "checking",
"value": "Checking",
"survey_user_id": 39
},
"2": {
"id": 1,
"survey_id": 14,
"question": "What's in your mind?",
"question_type": 1,
"created_at": "2016-07-15 18:29:05",
"updated_at": "2016-07-15 18:29:05",
"deleted_at": null,
"type": "textarea",
"ques_options_id": 1,
"key": "abc",
"value": "ABC",
"survey_user_id": 39
},
"3": {
"id": 8,
"survey_id": 14,
"question": "Whats abc here?",
"question_type": 3,
"created_at": "2016-07-15 18:29:05",
"updated_at": "2016-07-15 18:29:05",
"deleted_at": null,
"type": "radio",
"ques_options_id": 8,
"key": "abcde",
"value": "ABCDEF",
"survey_user_id": 39
},
"4": {
"id": 10,
"survey_id": 14,
"question": "Testing here?",
"question_type":...