I want to create a directive that takes an array of strings, and organizes them in a table, where there are 4 strings per row.
So for example, the array ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
would be rendered as:
a b c d
e f g h
For this, I can easily write a link
function that manually manipulates the DOM (jQuery style) and renderes this table.
But this feels wrong since we already have directives such as ng-repeat
that can do half of this work. I want to use the existing stuff that can help, and only code the new functionality.
How can I achieve this?