4. Loading: Loading

Source: Internet
Author: User
Tags export class

/ *---HTML----* /<ion-content>   <Button(click)= "Manual ()">Manual shutdown</Button>  <Button(click)= "Automatic ()">Auto Close</Button> </ion-content>/ *---HTML----* /
/*---js----*/Import {Page, Loading, Navcontroller} from' Ionic-angular '; @Page ({templateurl:' Build/pages/tabs/tabs.html ',}) Export class Tabspage {static get parameters () {return[[Navcontroller]]; } constructor (NAV) { This. Nav =nav; } manual () {Let loading=loading.create ({content:"Please wait ...", Spinner:' Ios-small ',    });  This. nav.present (loading); SetTimeout (()={Loading.dismiss (); Console.log (' I did not set the Duration property. I closed it manually. ‘)    },1000)} automatic () {Let loading=loading.create ({content:"Please wait ...", Spinner:' Ios-small ', Duration:1000    });  This. nav.present (loading); Loading.ondismiss (()={Console.log (' I was automatically closed. ‘)    }); } } //Loading Setting parameters//1. Content: Contents, can be HTML statement//2, Duration: Duration of time, when the time to go to the end of the time to go dismiss () method. that is, the method in the identifier of the Loading.create//3, Showbackdrop: Whether to show the background layer//4, spinner:loading icon of the optional SVG iOS, dots, bubbles, circles, Ios-small, Crescent Hide,hide is not to display the icon//5. CssClass: Custom Style//6, Dismissonpagechange: whether to ignore the indicator when navigating to a new page default: Do not ignore, this method is to say this view jumps to another view when this loading is not effective//Note that manual shutdown and auto-Close method names are not the same.  /*---js----*/

4. Loading: Loading

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.