Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4827

How to draw table with ember

$
0
0

@polin11 wrote:

You need to draw the table after the user enters the size of the table
Decided to change the template game-line.hbs

game-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

Read full topic


Viewing all articles
Browse latest Browse all 4827

Trending Articles