多多色-多人伦交性欧美在线观看-多人伦精品一区二区三区视频-多色视频-免费黄色视屏网站-免费黄色在线

中國最全IT社區(qū)平臺 聯(lián)系我們 | 收藏本站
阿里云優(yōu)惠2

ionic教程

ionic 加載動作

閱讀 (2350)

ionic 加載動作

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

用法

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

方法

顯示一個加載效果。

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

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

  • {string=} template 指示器的html內(nèi)容。
  • {string=} templateUrl 一個加載html模板的url作為指示器的內(nèi)容。
  • {boolean=} noBackdrop 是否隱藏背景。默認情況下它會顯示。
  • {number=} delay 指示器延遲多少毫秒顯示。默認為不延遲。
  • {number=} duration 等待多少毫秒后自動隱藏指示器。默認情況下,指示器會一直顯示,直到觸發(fā).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.vxbq.cn/s/statics/demosource/ionic.min.css" rel="stylesheet">
    <script src="http://www.vxbq.cn/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

設(shè)置加載的默認選項:

用法:

var app = angular.module('myApp', ['ionic'])
app.constant('$ionicLoadingConfig', {
  template: '默認加載模板……'
});
app.controller('AppCtrl', function($scope, $ionicLoading) {
  $scope.showLoading = function() {
    $ionicLoading.show(); //配置選項在 $ionicLoadingConfig 設(shè)置
  };
});
關(guān)閉
程序員人生
主站蜘蛛池模板: 国产成人亚洲综合在线 | 一级一级毛片看看 | 97影院2| 一级作爱视频免费观看 | 福利片在线 | 国内精品视频九九九九 | 亚洲欧美日本韩国 | 咸片在线网站免费观看 | 国产亚洲精品久久久久久午夜 | 一二三四在线播放免费视频中国 | 亚洲综合网址 | 婷婷去我也去 | 亚洲a在线视频 | 国产天堂网 | 国产精品一区伦免视频播放 | 男女做爽爽免费视频 | 噜噜影院 | 欧美一级成人毛片视频 | 蜜中蜜3动漫无修在线播放 免费 黄 色 人成 视频 | 伊人不卡久久大香线蕉综合影院 | 最近最新中文字幕大全2019免费视频 | 午夜亚洲视频 | 91桃色观看免费高清 | 美国毛片免费看 | 欧美一级片免费观看 | 日韩专区亚洲精品欧美专区 | 亚洲欧洲久久 | 亚洲视频在线视频 | 美女网站在线观看视频免费的 | 亚洲精品网站在线观看不卡无广告 | 午夜影院啪啪 | 欧美xxxxx极品| 国产毛片在线视频 | 在线观看中文字幕亚洲 | 91久久偷偷做嫩草影院 | 一级a性色生活片久久毛片 一级a性色生活片毛片 | 国语精品91自产拍在线观看二区 | 韩国v欧美v亚洲v日本v | 欧美最猛性xxxxx亚洲精品 | 国产五月 | 91日本在线观看亚洲精品 |