I need your help. I have 2 fields for input dimension of table (input for number of rows and columns) and one button. If I click this button, table should be filled dynamically with given number of rows and columns. How can make this functionality, that table be filled with values starting from bottom right cell spiral / in circuit to the left and top until all cells (in clockwise direction)...
What is the best way to this with HTML, AngularJS, jQuery / JavaScript. (See picture) http://i.imgur.com/O4GRpND.jpg
Thanks a lot
Currently i have made something just like this:
Cyclic table
<fieldset>
<legend>Input</legend>
<label id="nameRow" >Number of Rows</label> <br />
<input type="number" ng-model="row" placeholder="Row" ><br /><br /><br />
<label id="nameCol">Number of Columns</label> <br />
<input type="number" ng-model="col" placeholder="Column" ><br />
<br></br>
<button type="button" ng-click="addRowCol()">KREIRAJ TABLICU</button>
</fieldset>
<table border="1" cellpadding="10">
<body>
<tr ng-repeat="input Rows and Columns">
<td>
{{ input.row }}
</td>
<td>
{{ input.column }}
</td>
</tr>
</body>
</table>