案例: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.settingsList = [
15
        { text: "Wireless", checked: true },
16
        { text: "GPS", checked: false },
17
        { text: "Bluetooth", checked: false }
18
      ];
19
20
      $scope.pushNotificationChange = function() {
21
        console.log('Push Notification Change', $scope.pushNotification.checked);
22
      };
23
      
24
      $scope.pushNotification = { checked: true };
25
      $scope.emailNotification = 'Subscribed';
26
      
27
    });
28
    </script>
29
    <style type="text/css">
30
    body {
31
      cursor: url('finger.png'), auto;
32
    }
33
    </style>
34
  </head>
35
36
  <body ng-controller="MainCtrl">
37
    
38
   <ion-header-bar class="bar-positive">
39
      <h1 class="title">切换开关</h1>
40
    </ion-header-bar>
41
             
42
    <ion-content>
43
      
44
      <div class="list">
45
        
46
        <div class="item item-divider"> 
47
          Settings
48
        </div>