93

I am currently using this piece of code to render a list:

<ul ng-cloak>
    <div ng-repeat="n in list">
        <li><a href="{{ n[1] }}">{{ n[0] }}</a></li>
        <li class="divider"></i>
    </div>
    <li>Additional item</li> 
</ul>

However, the <div> element is causing some very minor rendering defects on some browsers. I would like to know is there a way to do the ng-repeat without the div container, or some alternative method to achieve the same effect.

nehz
  • 2,172
  • 2
  • 23
  • 36
  • What rendering issues are you talking about? – Ja͢ck Oct 12 '12 at 11:15
  • the last li divider seems a bit thicker like its stacked (chrome win7). This could be a css issue, however, I would like to know if this could be fixed in angular. For comparison, knockoutJS allows containerless bindings using . – nehz Oct 12 '12 at 11:42
  • I see, I use phptal on the server side and they have a tal:block tag specifically for this purpose :) guess with DOM not always accepting a new kind of tag that's harder with angular – Ja͢ck Oct 12 '12 at 13:25
  • Could you also update the html to reflect how you are using the `htmlAppend` directive? – Nick Mar 27 '13 at 10:37
  • Done... did this a while ago, but I do remember it working – nehz Mar 28 '13 at 05:42
  • Put the ng-repeat on the ul? Actually strike that, it doesn't account for the
  • Additional item
  • – superluminary Jun 25 '14 at 14:31