I would like to implement UI matrix pattern, which should generate dynamically. By receiving input parameter it should decide what would be UI matrix pattern dimensions: For
Building arrays just to iterate over them seems lavish. Creating a Directive
to replace ngFor
is sort of redundant.
Instead you could use a Pipe
returning an Iterable
and use it like this:
{{ i }}
For an implementation of such a Pipe
have a look at my other answer on Repeat HTML element multiple times using ngFor based on a number.