How to add Icon inside the Angular material Snackbar in Angular 5

后端 未结 5 2003
情书的邮戳
情书的邮戳 2021-02-15 01:34

I am new to angular and I am using Angular Material Design for UI.

In my application I have a snackbar .

Now I want to set an Icon inside the snackbar but I trie

5条回答
  •  广开言路
    2021-02-15 02:22

    The open method of the MatSnackBar lets you only open snack bars with text, that is to say simple snack bars. If you want to have a more sophisticated snack bar - such as one with an icon added -, you will have to create a distinct component and open that very component with the openFromComponent method.

提交回复
热议问题