@polin11 wrote:
You need to draw the table after the user enters the size of the table
Decided to change the template game-line.hbsgame-line.js
import Ember from 'ember'; export default Ember.Component.extend({ //tableRows:[0,1,2, 3, 4,5,6,7,8], everything works, but this array should have size one entered by the user //tableCols:[0,1,2, 3, 4,5,6,7,8], everything works, but this array should have size one entered by the user //tried this but not working tableCols:[], tableRows:[], actions:{ click_button() { this.cell=parseInt(get_cells.value); for (let i = 0; i < this.cell; i++) { this.tableRows.push(i); this.tableCols.push(i); } } }, )}
thanks in advance
Posts: 1
Participants: 1