title: Disable android device back button until ionic LoadingController close
body: <p>We are worked on ionic native mobile app.In  application have  more then 10 page.</p>
  
  <p>Loader code:
  //LoaderService</p>
  
  <pre><code>    this.loader = this.loadingCtrl.create({
            content: "Loading",
            //duration: 2000,
          });
          return this.loader;
  this.loader = this.LoaderService();
  this.loader.present();//Loader start
  his.loader.dismiss();//Loader Stop
  </code></pre>
  
  <p>Loader we are using every page .If loader is open in that time user click back button, Back button function working it's going to other page loader also going to next page .</p>
  
  <p>We need if loader open back button code should stop working </p>
  
  <p>Back button code
  app.component.ts</p>
  
  <pre><code>if (this.platform.is('android')) {
          this.platform.registerBackButtonAction((e) =&gt; {
              //my code
            });
          }
  </code></pre>
  
  <p>We tried one way like put flag true while loader present.while dismiss set flag false.But we can't change every page.Give me any idea for that </p>