【问题标题】:AngularJS toaster individual toast positionAngularJS烤面包机个人烤面包位置
【发布时间】:2017-02-22 09:15:52
【问题描述】:

我已经在 html 中全局配置了 toasts

<toaster-container toaster-options="{'close-button': true, 'position-class': 'toast-bottom-right'}"></toaster-container>

这就是我如何弹出它们

          core.toaster.pop({
              type: 'info',
              title: 'some title',
              timeout: 0
          });

我想知道如何单独定位每个 toast 并从 html 覆盖全局配置。默认情况下,它们位于右下角,但例如我希望在右上角显示一个吐司。在 toaster.pop 中添加类似 positionClass: 'toast-top-right' 的内容不起作用。

【问题讨论】:

    标签: javascript angularjs toast toastr


    【解决方案1】:

    试试这个,

    您可以为您的烤面包机创建另一个烤面包机容器,您需要使用 toaster_id 将其定位在不同的位置。

    查看此plunker 了解工作模型。

    希望这个对您有所帮助...

    【讨论】:

      猜你喜欢
      • 2018-02-26
      • 2022-07-29
      • 1970-01-01
      • 2013-07-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-24
      • 2018-05-12
      相关资源
      最近更新 更多