【问题标题】:How to remove the warning message from firebase angular application如何从 firebase 角度应用程序中删除警告消息
【发布时间】:2022-12-12 04:26:51
【问题描述】:

我正在使用 @angular/fire emulators 来模拟我的 firebase angular 应用程序中的身份验证过程。但是当我运行它时,我看到一条警告消息说“在模拟器模式下运行。不要使用生产凭证”:

我在github issues 中看到实现了一项功能以隐藏此消息。但我不知道该怎么做。

你知道我要这么做吗?

【问题讨论】:

    标签: angular typescript firebase angularfire2


    【解决方案1】:

    有点晚了,但这是我最近不得不处理的解决方案。

    1. 我检查了元素,发现警告消息有 css 类“.firebase 仿真器警告”

    2. 从那里我只是在 CSS 中定义样式来隐藏警告

      /* making firebase emulator warning less intrusive */
      .firebase-emulator-warning {
        display: none';
      }

      然后我决定仍然展示它是个好主意,但要减少干扰。 为此,我使用了稍微不同的样式。

      /* making firebase emulator warning less intrusive */
      .firebase-emulator-warning {
        background-color: transparent !important;
        border: none !important;
        color: rgba(245, 66, 66, 0.3) !important;
      }

      结果:

    【讨论】:

      猜你喜欢
      • 2021-01-16
      • 1970-01-01
      • 2016-01-25
      • 2010-12-31
      • 2020-05-16
      • 2018-06-10
      • 2015-06-28
      • 1970-01-01
      • 2021-11-29
      相关资源
      最近更新 更多