From e5c148801dc7438245133b64f35eb930e855ce6a Mon Sep 17 00:00:00 2001 From: Zachariah Moreno Date: Tue, 25 Mar 2014 22:23:02 -0700 Subject: [PATCH] Matching option-button names in examples --- js/ext/angular/src/directive/ionicList.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/js/ext/angular/src/directive/ionicList.js b/js/ext/angular/src/directive/ionicList.js index 1b2982be45..84e6cb2914 100644 --- a/js/ext/angular/src/directive/ionicList.js +++ b/js/ext/angular/src/directive/ionicList.js @@ -20,7 +20,7 @@ angular.module('ionic.ui.list', ['ngAnimate']) * + * option-buttons="itemButtons"> * * * ``` @@ -28,11 +28,22 @@ angular.module('ionic.ui.list', ['ngAnimate']) * @param {string=} item-type The type of this item. See [the list CSS page](/docs/components/#list) for available item types. * @param {expression=} option-buttons The option buttons to show when swiping the item to the left (if swiping is enabled). Defaults to the ionList parent's option-buttons setting. The format of each button object is: * ```js - * { - * text: 'Edit', - * type: 'Button', - * onTap: function(item) {} - * } + * $scope.itemButtons = [ + * { + * text: 'Edit', + * type: 'Button', + * onTap: function(item) { + * alert('Edit Item: ' + item.id); + * } + * }, + * { + * text: 'Share', + * type: 'Button', + * onTap: function(item) { + * alert('Share Item: ' + item.id); + * } + * } + * ]; * ``` * * @param {expression=} item The 'object' representing this item, to be passed in to swipe, delete, and reorder callbacks.