diff --git a/js/angular/directive/list.js b/js/angular/directive/list.js index 69e0905f20..c5577151c2 100644 --- a/js/angular/directive/list.js +++ b/js/angular/directive/list.js @@ -72,6 +72,154 @@ * @param can-swipe {boolean=} Whether the items in the list are allowed to be swiped to reveal * option buttons. Default: true. */ +/** + * @ngdoc demo + * @name ionList#everything + * @module listEverything + * @javascript + * angular.module('listEverything', ['ionic']) + * .controller('ListCtrl', function($scope, $ionicPopup) { + * $scope.data = { + * showReorder: false, + * showDelete: false + * }; + * + * $scope.items = []; + * for (var i = 0; i < 20; i++) { + * $scope.items.push(i); + * } + * + * $scope.toggleDelete = function() { + * $scope.data.showReorder = false; + * $scope.data.showDelete = !$scope.data.showDelete; + * }; + * $scope.toggleReorder = function() { + * $scope.data.showDelete = false; + * $scope.data.showReorder = !$scope.data.showReorder; + * }; + * + * $scope.share = function(item) { + * alert('Sharing ' + item); + * }; + * $scope.edit = function(item) { + * alert('Editing ' + item); + * }; + * + * $scope.reorderItem = function(item, fromIndex, toIndex) { + * $scope.items.splice(fromIndex, 1) + * $scope.items.splice(toIndex, 0, item) + * }; + * }); + * + * @html + *
Here's an item description.
+ *