How would I render a dynamic definition list using AngularJS?

前端 未结 4 1733
南方客
南方客 2021-01-31 07:03

How would I render a dynamic definition list using AngularJS?

Example:

Data:

[
    {
        key: \'a\',
        value: \'x\'
    }, {
        ke         


        
4条回答
  •  萌比男神i
    2021-01-31 07:34

    This is a problem, because you need to wrap it with some element in order to do repeating. And that's not gonna be a valid html - you would get into the same trouble with unordered lists or tables...

    {{i.key}}
    {{i.value}}

    I guess the div inside dl is not allowed by spec, but it works - at least in Chrome :-D

    We plan to support ng-repeat inside a comment to support this.

提交回复
热议问题