definition list with ng-repeat

528 views
Skip to first unread message

Anuj Gakhar

unread,
Dec 9, 2012, 3:41:15 PM12/9/12
to ang...@googlegroups.com
Hi all,

I am after a markup that looks like this

<dl>
<dt>Heading 1</dt>
<dd>Item 1</dd>
<dd>Item 2</dd>
<dd>Item3></dd>
<dt>Heading 2</dt>
<dd> Item 4</dd>
<dd>Item 5</dd>
</dl>

I understand this is not possible with ng-repeat as ng-repeat would need a containing div? I could wrap the dt's and dd's with a div but that breaks the plugin I am trying to use https://github.com/teamdf/jquery-list.
This plugin needs the exact markup as described above.

Any ideas of any workaround?

Thanks in advance.

Pawel Kozlowski

unread,
Dec 9, 2012, 3:42:51 PM12/9/12
to ang...@googlegroups.com
Let's hope that this one works and will get merged soon:
https://github.com/angular/angular.js/pull/1646

Cheers,
Pawel
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To post to this group, send email to ang...@googlegroups.com.
> To unsubscribe from this group, send email to
> angular+u...@googlegroups.com.
> Visit this group at http://groups.google.com/group/angular?hl=en-US.
>
>



--
Question? Send a fiddle
(http://jsfiddle.net/pkozlowski_opensource/Q2NpJ/) or a plunk
(http://plnkr.co/)
Need help with jsFiddle? Check this:
http://pkozlowskios.wordpress.com/2012/08/12/using-jsfiddle-with-angularjs/

Looking for UI widget library for AngularJS? Here you go:
http://angular-ui.github.com/

Anuj Gakhar

unread,
Dec 9, 2012, 4:09:11 PM12/9/12
to ang...@googlegroups.com
Oh cool, so currently there is no way of doing this?

Pawel Kozlowski

unread,
Dec 9, 2012, 4:12:22 PM12/9/12
to ang...@googlegroups.com
On Sun, Dec 9, 2012 at 10:09 PM, Anuj Gakhar <anuj....@gmail.com> wrote:
> Oh cool, so currently there is no way of doing this?

Currently you need a DOM container element for the ngRepet directive
to do it work.

Cheers,
Pawel
Reply all
Reply to author
Forward
0 new messages