Hi,
I needed the ability to control the HTML in some of my cells.
I've edited the NgTableComponent template code and made it check for each column if it has a "template" property.
If it has the above, it "sends" the row and the cell content to that template.
otherwise, it uses a default template.
I'm quite new with Angular, so I've tried to make as few changes as possible.
Also, I wanted to use the "ng-template" element, but it didn't work, probably because of the angular version.
It's easy to change this.
I saw that there are some pull requests for similar issues and they are pending because of a plan to redesign the plugin.
However, this commit is very small so, maybe, you could consider pulling it to the main branch.
Hi, I needed the ability to control the HTML in some of my cells. I've edited the NgTableComponent template code and made it check for each column if it has a "template" property. If it has the above, it "sends" the row and the cell content to that template. otherwise, it uses a default template.
This is the code of the feature: https://github.com/valor-software/ng2-table/commit/e483bf2450780f0d570d3295e42964773cdc3983
And this commit shows an example of how to use it: https://github.com/valor-software/ng2-table/commit/aec2ad08a47325cbd5a1717ea090d01db74aca0d
I'm quite new with Angular, so I've tried to make as few changes as possible. Also, I wanted to use the "ng-template" element, but it didn't work, probably because of the angular version. It's easy to change this.
I saw that there are some pull requests for similar issues and they are pending because of a plan to redesign the plugin. However, this commit is very small so, maybe, you could consider pulling it to the main branch.
Thanks, Ben.