Angular seems to be inserting additional elements in the dom/html, causing flex-grow not to be applied to the right element. A fully working hardcoded version is present, but I am struggling to make it accept a dynamic number of items. See better here:
````https://codepen.io/beaversArePeopleToo/pen/GReydYJ
2
Answers
is this the expected output?
I am using
ngFor
to create the elements and we can add theline
class item between them, we can prevent the last element from having*****
by using thengfor
variablelast
to prevent the last one!stackblitz
This appears to be a styling question so why not use CSS to solve? It’s cleaner, flex will grow the row to fill horizontal space and space out any number of elements evenly (however depending on the number and their width you may get overflow).