案例:ionic案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
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
        <title>W3xue教程(w3xue.com)</title>
6
        <link href="/css/ionic1.0.1/ionic.min.css" rel="stylesheet">
7
        <script src="/js/ionic1.0.1/ionic.bundle.min.js"></script>
8
        <script type="text/javascript">
9
          angular.module('starter', ['ionic'])
10
11
          .run(function($ionicPlatform) {
12
            $ionicPlatform.ready(function() {
13
              // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
14
              // for form inputs)
15
              if(window.cordova && window.cordova.plugins.Keyboard) {
16
                cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
17
              }
18
              if(window.StatusBar) {
19
                StatusBar.styleDefault();
20
              }
21
            });
22
          })
23
24
          .controller( 'actionsheetCtl',['$scope','$ionicActionSheet','$timeout' ,function($scope,$ionicActionSheet,$timeout){
25
              $scope.show = function() {
26
27
                  var hideSheet = $ionicActionSheet.show({
28
                      buttons: [
29
                        { text: '<b>Share</b> This' },
30
                        { text: 'Move' }
31
                      ],
32
                      destructiveText: 'Delete',
33
                      titleText: 'Modify your album',
34
                      cancelText: 'Cancel',
35
                      cancel: function() {
36
                           // add cancel code..
37
                         },
38
                      buttonClicked: function(index) {
39
                        return true;
40
                      }
41
                  });
42
43
                  $timeout(function() {
44
                      hideSheet();
45
                  }, 2000);
46
47
              };  
48
          }])