# Ionic List Syntax

**URL:** <https://forum.ionicframework.com/t/ionic-list-syntax/3210>\
**Category:** ionic-v1\
**Created:** [April 20, 2014, 5:05pm UTC](https://forum.ionicframework.com/t/ionic-list-syntax/3210 "2014-04-20T17:05:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matias](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/matias/32/99229_2.png) [@matias](https://forum.ionicframework.com/u/matias)\
**Post date:** [April 20, 2014, 5:05pm UTC](https://forum.ionicframework.com/t/ionic-list-syntax/3210/1 "2014-04-20T17:05:52Z")

</div>

I am not sure about the syntax for the Ionic lists.

I don’t know if is the same this:

```
<div class="list">

  <div class="item item-divider">
    Candy Bars
  </div>

  <a class="item" href="#">
    Butterfinger
  </a>

</div>

```

and this:

```
<ion-list>
  <ion-item ng-repeat="item in items"
    item="item"
    can-swipe="true"
    option-buttons="itemButtons">
  </ion-item>
</ion-list>

```

both render the same, but which one should I use?

For example, I tried:

```
<ion-list>
    <ion-item class="item item-divider">
      Categories
    </ion-item>
    <ion-item ng-repeat="category in categories">
      {{category.name}}
    </ion-item>
  </ion-list>

```

And the `item-divider` didn’t look well, so I replace it with this:

```
<div class="item item-divider">
  Categories
</div>

```

and works.

* * *

Perhaps it’s a silly question. But can someone clarify me this, please?

Thanks!

---

<div class="post-metadata">

**Author:** ![Calendee](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/calendee/32/13656_2.png) [@Calendee](https://forum.ionicframework.com/u/Calendee)\
**Post date:** [April 21, 2014, 11:33am UTC](https://forum.ionicframework.com/t/ionic-list-syntax/3210/2 "2014-04-21T11:33:40Z")

</div>

`ion-list` is a special Ionic directive that gives you “complex” lists. These lists can have special features such as re-ordering, swipe to expose buttons, deleting, etc.

The simple `class="list"` are just that - lists of stuff with none of the extra functionality. I personally use the class for my lists as I never need the additional features. I’d have to assume that the extra features add some minor overhead. So, if you don’t need them, I’d suggest using the simple classes.

---

<div class="post-metadata">

**Author:** ![matias](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/matias/32/99229_2.png) [@matias](https://forum.ionicframework.com/u/matias)\
**Post date:** [April 21, 2014, 2:04pm UTC](https://forum.ionicframework.com/t/ionic-list-syntax/3210/3 "2014-04-21T14:04:09Z")

</div>

Ok, for now that I don´t need anything like that I am going to use only the class.

Thanks for the explanation.
