當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript nativescript-loading-indicator.LoadingIndicator類代碼示例

本文整理匯總了TypeScript中nativescript-loading-indicator.LoadingIndicator的典型用法代碼示例。如果您正苦於以下問題:TypeScript LoadingIndicator類的具體用法?TypeScript LoadingIndicator怎麽用?TypeScript LoadingIndicator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了LoadingIndicator類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: createTask

    createTask() {
        //start the loading animation
        var loader = new LoadingIndicator();
        loader.show();

        console.log(JSON.stringify(this.request));

        //send task to server
        this.taskService.sendTask(this.request).subscribe((result) => {
            console.log("got response: " + result);

            //stop the loading animation
            loader.hide();

            //navigate back to home
            this._router.navigate(["StaffScreen/Home"]);
        }, (error) => {
            console.log("error posting task");
            console.log(JSON.stringify(error));
            loader.hide();
            alert("Error. Task could not be made. Check your internet connection and try again");
        });
    }
開發者ID:mattpcaswell,項目名稱:bespoke-concierge,代碼行數:23,代碼來源:ownerTaskMaker.component.ts

示例2: showLoaderMsgAndDetails

 public showLoaderMsgAndDetails() {
   this.indicator.show({ message: 'One moment', ios: { details: 'Updating data...' } });
   setTimeout(() => {
     this.indicator.show({ ios: { details: 'Transferring secret codes...' } });
     this.demoLoader();
   }, 1000);
 }
開發者ID:jaycom,項目名稱:nativescript-loading-indicator,代碼行數:7,代碼來源:main-view-model.ts

示例3:

        this.taskService.sendTask(this.request).subscribe((result) => {
            console.log("got response: " + result);

            //stop the loading animation
            loader.hide();

            //navigate back to home
            this._router.navigate(["StaffScreen/Home"]);
        }, (error) => {
開發者ID:mattpcaswell,項目名稱:bespoke-concierge,代碼行數:9,代碼來源:ownerTaskMaker.component.ts

示例4: showLoaderModeCustom

 public showLoaderModeCustom() {
   this.indicator.show({ message: 'Completed', ios: { mode: MBProgressHUDModeCustomView, customView: 'Checkmark.png' } });
   this.demoLoader();
 }
開發者ID:jaycom,項目名稱:nativescript-loading-indicator,代碼行數:4,代碼來源:main-view-model.ts

示例5: showLoaderModeText

 public showLoaderModeText() {
   this.indicator.show({ message: 'Text only', ios: { mode: MBProgressHUDModeText } });
   this.demoLoader();
 }
開發者ID:jaycom,項目名稱:nativescript-loading-indicator,代碼行數:4,代碼來源:main-view-model.ts

示例6: showLoaderDeterminateHorizontalBar

 public showLoaderDeterminateHorizontalBar() {
   this.indicator.show({ ios: { mode: MBProgressHUDModeDeterminateHorizontalBar } });
   this.demoProgress();
 }
開發者ID:jaycom,項目名稱:nativescript-loading-indicator,代碼行數:4,代碼來源:main-view-model.ts

示例7: showLoaderAnnularDeterminate

 public showLoaderAnnularDeterminate() {
   this.indicator.show({ ios: { mode: MBProgressHUDModeAnnularDeterminate } });
   this.demoProgress();
 }
開發者ID:jaycom,項目名稱:nativescript-loading-indicator,代碼行數:4,代碼來源:main-view-model.ts

示例8: showLoaderColor

 public showLoaderColor() {
   this.indicator.show({ ios: { color: '#4B9ED6' } });
   this.demoLoader();
 }
開發者ID:jaycom,項目名稱:nativescript-loading-indicator,代碼行數:4,代碼來源:main-view-model.ts

示例9: setTimeout

 setTimeout(() => {
   this.indicator.show({ progress: 35 });
 }, 1500);
開發者ID:jaycom,項目名稱:nativescript-loading-indicator,代碼行數:3,代碼來源:main-view-model-android.ts

示例10: setTimeout

 setTimeout(() => {
   this.indicator.show({ progress: 0.99 });
 }, 4500);
開發者ID:jaycom,項目名稱:nativescript-loading-indicator,代碼行數:3,代碼來源:main-view-model.ts


注:本文中的nativescript-loading-indicator.LoadingIndicator類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。