日本搞逼视频_黄色一级片免费在线观看_色99久久_性明星video另类hd_欧美77_综合在线视频

中國最全IT社區平臺 聯系我們 | 收藏本站
阿里云優惠2

ionic教程

ionic 加載動作

閱讀 (2352)

ionic 加載動作

$ionicLoading 是 ionic 默認的一個加載交互效果。里面的內容也是可以在模板里面修改。

用法

angular.module('LoadingApp', ['ionic'])
.controller('LoadingCtrl', function($scope, $ionicLoading) {
  $scope.show = function() {
    $ionicLoading.show({
      template: 'Loading...'
    });
  };
  $scope.hide = function(){
    $ionicLoading.hide();
  };
});

方法

顯示一個加載效果。

show(opts)
參數 類型 詳情
opts object

loading指示器的選項。可用屬性:

  • {string=} template 指示器的html內容。
  • {string=} templateUrl 一個加載html模板的url作為指示器的內容。
  • {boolean=} noBackdrop 是否隱藏背景。默認情況下它會顯示。
  • {number=} delay 指示器延遲多少毫秒顯示。默認為不延遲。
  • {number=} duration 等待多少毫秒后自動隱藏指示器。默認情況下,指示器會一直顯示,直到觸發.hide()

隱藏一個加載效果。

hide()

API

屬性 類型 詳情
delegate-handle
(可選)
字符串

該句柄定義帶有$ionicListDelegate的列表。

show-delete
(可選)
布爾值

列表項的刪除按鈕當前是顯示還是隱藏。

show-reorder
(可選)
布爾值

列表項的排序按鈕當前是顯示還是隱藏。

can-swipe
(可選)
布爾值

列表項是否被允許滑動顯示選項按鈕。默認:true。


實例

HTML 代碼:

<html ng-app="ionicApp">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> 
    
    <title>Ionic Modal</title>

     <link href="http://www.jyygyx.com/s/statics/demosource/ionic.min.css" rel="stylesheet">
    <script src="http://www.jyygyx.com/s/statics/demosource/ionic.bundle.min.js"></script>
  </head>
  <body ng-controller="AppCtrl">
    
      <ion-view title="Home">
        <ion-header-bar>
          <h1 class="title">The Stooges</h1>
        </ion-header-bar>
        <ion-content has-header="true">
          <ion-list>
            <ion-item ng-repeat="stooge in stooges" href="#">{{stooge.name}}</ion-item>
          </ion-list>
        </ion-content>
      </ion-view>
    
  </body>
</html>

JavaScript 代碼

angular.module('ionicApp', ['ionic'])
.controller('AppCtrl', function($scope, $timeout, $ionicLoading) {

  // Setup the loader
  $ionicLoading.show({
    content: 'Loading',
    animation: 'fade-in',
    showBackdrop: true,
    maxWidth: 200,
    showDelay: 0
  });
  
  // Set a timeout to clear loader, however you would actually call the $ionicLoading.hide(); method whenever everything is ready or loaded.
  $timeout(function () {
    $ionicLoading.hide();
    $scope.stooges = [{name: 'Moe'}, {name: 'Larry'}, {name: 'Curly'}];
  }, 2000);
  
});

嘗試一下 ?


$ionicLoadingConfig

設置加載的默認選項:

用法:

var app = angular.module('myApp', ['ionic'])
app.constant('$ionicLoadingConfig', {
  template: '默認加載模板……'
});
app.controller('AppCtrl', function($scope, $ionicLoading) {
  $scope.showLoading = function() {
    $ionicLoading.show(); //配置選項在 $ionicLoadingConfig 設置
  };
});
關閉
程序員人生
主站蜘蛛池模板: 欧美a区| 亚洲第二区 | 精品一区二区三区在线播放 | 国产精品卡一卡二 | 精品国产一二 | 欧美日韩一区二区精品 | 国产精品视频1区2区3区 | 中国一级黄色大片 | 国产一区三区在线 | 在线视频区 | 天堂中文аⅴ在线 | 久久99国产精品久久99大师 | 99在线看 | 国产麻豆一区二区三区在线观看 | 亚洲一区二区中文字幕 | 日韩区欧美久久久无人区 | 正在播放国产一区二区 | 天堂av中文 | a级毛片免费全部播放 | 日产精品久久久一区二区 | 国产麻豆一区二区三区在线观看 | 国产全黄a一级毛片91 | 精品国产91 | 久久久久久久免费 | 亚洲精品中文字幕在线 | 激情综合五月天 | 天堂在线视频 | 色婷婷99se在线观看 | av片免费| 久久免费99精品久久久久久 | 在线免费观看亚洲 | 久久久鲁 | 日本黄a三级三级三级 | 男女做网站 | 91麻豆国产精品 | 久草综合在线 | 韩日一级| 成人午夜小视频 | 欧美日韩精品久久久久 | 一区二区欧美精品 | 嫩草影院懂你的影院 |