I am trying to show ng-repeat data with properly aligned checkboxes as vertically.Below is the code snippet that i tried:
<table width="100%" class="table">
<tbody>
<tr>
<td><label for="fruits" class="control-label">Select
Fruits</label></td></td>
<td><label ng-repeat="fruit in MainCtrl.fruits">
<input type="checkbox">
</label></td>
</tr>
</tbody>
</table>
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope){
$scope.fruits = {Apple,Mango};
});
It displays the rows horizontally like below:Apple Mango but i want it to display it vertically.
Aucun commentaire:
Enregistrer un commentaire