Tuesday 12 December 2017

Part 15 how to use loadig in ionic





in this video, I will show you that how you can create loading component in your ionic application.

The Loading component is an overlay that prevents user interaction while indicating activity. By default, it shows a spinner based on the mode. Dynamic content can be passed and displayed with the spinner. The spinner can be hidden or customized to use several predefined options. The loading indicator is presented on top of other content even during navigation.



to create loading component first import this.



import { LoadingController } from 'ionic-angular';



then create an instance of this LoadingController



export class MyPage {

  constructor(public loadingCtrl: LoadingController) {

  }



then create a method



  presentLoading() {

    let loader = this.loadingCtrl.create({

      content: "Please wait...",

      duration: 3000

    });

    loader.present();

  }

}



now call this method inside the button



<button ion-button (click)="presentLoading()">click me </button>

====================================================

to download full source code and presentation visit our wesite and Blog



website : - http://dotnetlab.in/

source code : - https://github.com/rahuljograna

facebook page :- https://www.facebook.com/DotnetLab-1896440207343189/

visit my blog : - http://aspnetinhindi.blogspot.in

follow me on twitter : https://twitter.com/THEJOGRANA



No comments:

Post a Comment

Part 20 consuming rest api in ionic

in this video, I will show you that how you can consume the rest API. in the previous video we have implemented the asp.net web API projec...