I'm new to this group and I have a question regarding ng-repeat, following is my json data:
$scope.routines = [ { CLASSTIME_ID: 1, COURSE_CODE: "CSTE-1001", SEMESTER_ID: "1st", WEEKDAY : "Sunday" }, { CLASSTIME_ID: 2, COURSE_CODE: "CSTE-1002", SEMESTER_ID: "1st", WEEKDAY : "Sunday" }, { CLASSTIME_ID: 1, COURSE_CODE: "CSTE-1003", SEMESTER_ID: "2nd", WEEKDAY : "Monday" } ]; $scope.classtimes = [ { CLASSTIME_ID: 1 ,CLASSTIME: "9.00-9.50" }, { CLASSTIME_ID: 2, CLASSTIME: "10.00-10.50" }, { CLASSTIME_ID: 3, CLASSTIME: "11.00-11.50" }, { CLASSTIME_ID: 4, CLASSTIME: "12.00-12.50" }, { CLASSTIME_ID: 5, CLASSTIME: "14.00-14.50" }, { CLASSTIME_ID: 6, CLASSTIME: "15.00-15.50" }, { CLASSTIME_ID: 7, CLASSTIME: "16.00-16.50" } ]; $scope.weekdays = [ { WEEKDAY: "Sunday" }, { WEEKDAY: "Monday" }, { WEEKDAY: "Tuesday" }, { WEEKDAY: "Wednesday" }, { WEEKDAY: "Friday" } ]; and following is my html code : <table class="table-bordered table-striped table-responsive"> <thead> <tr> <th style="width: 150px; height: 30px; background-color: rgb(17, 124, 183);color: white; text- align: center">Day</th> <th style="width: 150px; height: 30px; background-color: rgb(17, 124, 183);color: white; text- align: center" ng-repeat="c in classtimes | unique:'CLASSTIME_ID'"> {{c.CLASSTIME}}</th> </tr> </thead> <tbody> <tr ng-repeat="row in routines"> <td style="width: 150px; height: 30px; background-color: rgb( 57, 111, 141); color: white; text-align: center"> {{row.WEEKDAY}} </td> <td ng-repeat="routine in routines| unique:'CLASSTIME_ID'" style="width: 150px; height: 30px; background-color: rgb(0 , 127, 198); color: white; text-align: center"> <p ng-if="routine.CLASSTIME_ID === row.CLASSTIME_ID"> {{row.COURSE_CODE}}</p> </td> </tr> </tbody> </table> The table shows 'Sunday' data in two rows but i want to show them in one row. How can I achieve this? -- You received this message because you are subscribed to the Google Groups "Angular" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.