【问题标题】:How to implement HUD (spinner / activity indicator) in ionic 2?如何在ionic 2中实现HUD(微调器/活动指示器)?
【发布时间】:2016-05-25 22:29:07
【问题描述】:

$ionicLoading 的等效代码是什么。如果我有以下代码 sn-p 我如何为配置文件中的每个 http 请求设置加载 HUD。 (即应用调用网络服务时会自动添加HUD)

makePostRequest() {
    this.http.post("https://domain/post", "ur=kkr")
    .subscribe(data => {
        //Done loading, stop!
    }, error => {
        console.log(JSON.stringify(error.json()));
    });
}

【问题讨论】:

  • 也想知道。 +1
  • @happycoder 获得以下帮助的情况如何?

标签: web-services http angular hud ionic2


【解决方案1】:

请检查一下

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

     this.nav.present(loading);

通过loading ionic2 - 文档

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-08
    • 1970-01-01
    相关资源
    最近更新 更多