小编Mar*_*kus的帖子

离子4的黑暗主题

在Ionic 3中,我可以通过向我添加一行来轻松地将黑暗主题应用于我的应用variables.scss:

@import "ionic.theme.dark";
Run Code Online (Sandbox Code Playgroud)

这在Ionic 4中仍然可以这么简单吗?如果是,怎么样?

ionic4

12
推荐指数
1
解决办法
3454
查看次数

通过后退按钮在Ionic 4中关闭模态

我在Ionic 4中有一个模态。当用户按下手机上的“ 后退”按钮(或浏览器中的“后退”按钮)时,我想关闭它。

有人知道我该怎么做吗?

编辑:更多详细信息:

我有一个打开我的模式的按钮:

async onClick() {
  const modal = await this.modalController.create({
    component: Foo,
  });
  return await modal.present();
}
Run Code Online (Sandbox Code Playgroud)

组件Foo没有比关闭模式的按钮更多的内容:this.modalController.dismiss();。到目前为止,一切都很好。

但是,在我的手机上,当模式打开时,该应用程序现在关闭,并且用户点击了手机的后退按钮。但是在这种情况下,只有模态应该关闭。

modal-dialog ionic4

4
推荐指数
2
解决办法
6270
查看次数

Safari:“因为请求是跨域请求,所以阻止https:// ...要求其提供凭据。” 更新到Angular 8之后

我们已经通过基本身份验证保护了Angular网络应用。后更新我们的应用程序从7角到8.0,我们不再要求在Safari浏览器证书和下面的错误出现在控制台:

[Error] Blocked https://*/runtime-es2015.4f263ec725bc7710f1f5.js from asking for credentials because it is a cross-origin request.
[Error] Blocked https://*/main-es2015.6fa442dd5c5a204f47da.js from asking for credentials because it is a cross-origin request.
[Error] Blocked https://*/polyfills-es2015.fd951ae1d7572efa3bc6.js from asking for credentials because it is a cross-origin request.
Run Code Online (Sandbox Code Playgroud)

在Firefox和Chrome中,该应用仍然可以正常运行。Safari版本为12.1.1。

有谁知道Safari存在什么问题?

safari basic-authentication angular

4
推荐指数
3
解决办法
951
查看次数