Commit Graph

11 Commits

Author SHA1 Message Date
Andy Joslin
986dbac893 refactor(ionList): more expressive, declarative (breaking change)
Closes #1024.

BREAKING CHANGE: ion-list syntax has changed in favor of simplicity &
flexibility.

Relevant documentation:
[ionList](http://ionicframework.com/docs/api/directive/ionList),
[ionItem](http://ionicframework.com/docs/api/directive/ionItem),
[ionOptionButton](http://ionicframework.com/docs/api/directive/ionOptionButton),
[ionReorderButton](http://ionicframework.com/docs/api/directive/ionReorderButton),
[ionDeleteButton](http://ionicframework.com/docs/api/directive/ionDeleteButton),
[$ionicListDelegate](http://ionicframework.com/docs/api/service/$ionicListDelegate).

To migrate, change your code from this:

```html
<ion-list option-buttons="[{text:'hello',type:'button-positive',onTap:tap()}]"
          on-delete="onDelete(el)"
          delete-icon="ion-minus-circled"
          can-delete="true"
          show-delete="shouldShowDelete"
          on-reorder="onReorder(el, startIndex, toIndex)"
          reorder-icon="ion-navicon"
          can-reorder="true"
          show-reorder="shouldShowReorder">
  <ion-item ng-repeat="item in items">
    {{item}}
  </ion-item>
</ion-list>
```

To this:

```html
<ion-list show-delete="shouldShowDelete"
          show-reorder="shouldShowReorder">
  <ion-item ng-repeat="item in items">
    {{item}}
    <ion-delete-button class="ion-minus-circled"
                       ng-click="onDelete(item)">
    </ion-delete-button>
    <ion-reorder-button class="ion-navicon"
                       ng-click="onReorder(item, $fromIndex, $toIndex)">
    </ion-reorder-button>
    <ion-option-button class="button-positive" ng-click="tap()">
      Hello
    </ion-option-button>
  </ion-item>
</ion-list>
```
2014-04-04 10:12:16 -06:00
Adam Bradley
fe44a7d98b rename .item-drag to .item-reorder, further standardize item editing 2014-03-20 16:02:50 -05:00
Adam Bradley
07c824db8d fix(item): Restructure item editing css for added reusability and organization 2014-03-20 14:18:12 -05:00
Andy Joslin
2c39a21498 feat(ionic): prefix all directives with ion-
BREAKING CHANGE: All directives are now prefixed with `ion-`.

For any directive you use, add the ionic prefix.

For example, change this HTML:

```html
<tabs>
  <tab title="home" href="/tab/home">
    <content>Hello!</content>
  </tab>
</tabs>
```

To this HTML:

```
<ion-tabs>
  <ion-tab title="home" href="/tab/home">
    <ion-content>Hello!</ion-content>
  </ion-tab>
</ion-tabs>
```
2014-02-18 16:13:00 -05:00
Max Lynch
c949532cfd Fixed #424 - missing onReorder 2014-01-16 11:19:11 -07:00
Max Lynch
c5c68c2bf1 Removed ng-class on list item to not clash with user's use of ng-class 2014-01-12 20:24:44 -06:00
Adam Bradley
746a578d5e remove link-item tests 2013-12-13 11:16:17 -06:00
Adam Bradley
d9eb0440e6 list updates 2013-12-12 20:24:59 -06:00
Ulrich Sossou
b5aefa8291 ionicList directives cleanup 2013-11-23 13:36:50 +01:00
Max Lynch
25ad241910 More list view tests 2013-11-22 10:50:40 -06:00
Max Lynch
595fc67e49 List items with or without binding 2013-10-09 20:07:39 -05:00