案例:ionic案例     状态:可编辑再运行    进入竖版
 运行结果 
x
      <!-- The list directive is great, but be sure to also checkout the collection repeat directive when scrolling through large lists -->
 
1
<html ng-app="ionicApp">
2
  <head>
3
    <meta charset="utf-8">
4
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
5
    <title>Ionic List Directive</title>
6
   
7
    <link href="https://cdn.bootcss.com/ionic/1.3.2/css/ionic.css" rel="stylesheet">
8
    <script src="https://cdn.bootcss.com/ionic/1.3.2/js/ionic.bundle.min.js"></script>
9
    <script>
10
    angular.module('ionicApp', ['ionic'])
11
12
    .controller('MyCtrl', function($scope) {
13
      
14
      $scope.data = {
15
        showDelete: false
16
      };
17
      
18
      $scope.edit = function(item) {
19
        alert('Edit Item: ' + item.id);
20
      };
21
      $scope.share = function(item) {
22
        alert('Share Item: ' + item.id);
23
      };
24
      
25
      $scope.moveItem = function(item, fromIndex, toIndex) {
26
        $scope.items.splice(fromIndex, 1);
27
        $scope.items.splice(toIndex, 0, item);
28
      };
29
      
30
      $scope.onItemDelete = function(item) {
31
        $scope.items.splice($scope.items.indexOf(item), 1);
32
      };
33
      
34
      $scope.items = [
35
        { id: 0 },
36
        { id: 1 },
37
        { id: 2 },
38
        { id: 3 },
39
        { id: 4 },
40
        { id: 5 },
41
        { id: 6 },
42
        { id: 7 },
43
        { id: 8 },
44
        { id: 9 },
45
        { id: 10 },
46
        { id: 11 },
47
        { id: 12 },
48
        { id: 13 },