3

What is equivalent code for $ionicLoading. If I have below code snippet how can I set up loading HUD for every http request in a config file. (i.e. It will automatically add HUD when application calls a web-service)

makePostRequest() {
    this.http.post("https://domain/post", "ur=kkr")
    .subscribe(data => {
        //Done loading, stop!
    }, error => {
        console.log(JSON.stringify(error.json()));
    });
}
halfer
  • 19,824
  • 17
  • 99
  • 186
happycoder
  • 927
  • 3
  • 13
  • 28

1 Answers1

0

Please check this

  let loading = Loading.create({
    content: "Please wait...",
    duration: 3000
  });

     this.nav.present(loading);

go through loading ionic2 - documentation

Kartiikeya
  • 2,358
  • 7
  • 33
  • 68