Add dynamic column to table in smart-table [angularjs]
<p>I needed a little help over here on adding dynamic columns to table and I'm using smart-table project <code>https://lorenzofox3.github.io/smart-table-website/</code></p>

<p>Please look at plunker</p>

<pre><code>https://plnkr.co/edit/uTDa6hfwdgGtGWkYqL7S?p=preview
</code></pre>

<p>Click on add new column, it will update the table header, but I can't update the td element because I haven't created or binded any td element for new column. </p>

<p><strong>Need help on two things.</strong></p>

<p>1) Any number of new columns might come in future from server dynamically, so I can't bind any element statically in html like I did right now.</p>

<p>2) This is a little long one(I want to create a only one header as MV and in colspan I want current and next) and How do I accomplish that one ? If I divide like that, how do I go frame the data ? </p>

<p><strong>Additional Note on Question 1</strong>: I have tried dynamically showing the data in table. please look at line 27 in index.html. But again, If I go with this approach, the values get binded to different different columns since, data's are framed dynamically on controller. To be simple, there is no guarantee that data will be in in this order. </p>

<p>(SNo, companyName, companyFullName, MarketValueCurrent, MarketValueNext, QuarterCurrent, QuarterNext)</p>

<p>companyName might come first or at last. If I go by dynamic looping using ng-repeat, it binds MarketValueNext in first column, then companyName, etc in whichever the order the data is coming.</p>

<p>Thanks in advance. </p>