案例:ionic案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html ng-app="ionicApp">
2
  <head>
3
    <meta charset="utf-8">
4
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
5
    
6
    <title>W3xue教程(w3xue.com)</title>
7
    <link href="/css/ionic1.0.1/ionic.min.css" rel="stylesheet">
8
    <script src="/js/ionic1.0.1/ionic.bundle.min.js"></script>
9
    <script type="text/javascript">
10
    angular.module('ionicApp', ['ionic'])
11
12
    .controller('MainCtrl', function($scope) {
13
14
      $scope.clientSideList = [
15
        { text: "Backbone", value: "bb" },
16
        { text: "Angular", value: "ng" },
17
        { text: "Ember", value: "em" },
18
        { text: "Knockout", value: "ko" }
19
      ];
20
21
      $scope.serverSideList = [
22
        { text: "Go", value: "go" },
23
        { text: "Python", value: "py" },
24
        { text: "Ruby", value: "rb" },
25
        { text: "Java", value: "jv" }
26
      ];
27
      
28
      $scope.data = {
29
        clientSide: 'ng'
30
      };
31
      
32
      $scope.serverSideChange = function(item) {
33
        console.log("Selected Serverside, text:", item.text, "value:", item.value);
34
      };
35
      
36
    });
37
    </script>
38
    <style type="text/css">
39
    body {
40
      cursor: url('finger.png'), auto;
41
    }
42
    </style>
43
  </head>
44
45
  <body ng-controller="MainCtrl">
46
    
47
    <ion-header-bar class="bar-positive">
48
      <h1 class="title">当选按钮</h1>