angular - 无需使用组件中的snackbar 即可个性化snackbar
问题描述
我的问题很简单,但我似乎找不到任何方法让它工作。这是我的小吃店方法:
this.snackBar.open('The selected object cannot be deleted. The object2 with' + '\n' + ' the following IDs ' + A + ' depend on it. They need to be deleted first.', '', {
duration: 4000,
});
有没有一种简单的方法可以在不使用从组件打开或从模板打开的情况下将新行(简单地添加+ '\n'
不起作用)添加到快餐栏上显示的消息?
谢谢 !
解决方案
推荐阅读
- ruby-on-rails - Selenium web driver issue with rails server
- css - 我怎样才能用背景渐变制作这个形状?
- java - 更改节点名称时 JTree 更改 lineStyle
- python - Python 中的 iTerm2 自定义脚本
- javascript - 为什么提交表单后页面会重新加载?(React/Netlify/react-recaptcha)
- angular - 自定义角材料时刻日期选择器显示
- c++ - 如何使用柯南安装 Boost 属性树?
- apache-spark - 如何将 .msg 文件加载到 pyspark RDD 中?
- sql - 如果在 Oracle 上不存在插入或更新
- python - 如何检测给定图像中的所有矩形框