2

I am working with material angular, but I dont Find nothing similar an alerts of bootstrap, what can do?

<label [ngClass]="{'alert-danger':process.status === 1,
                        'alert-warning':process.status === 2,
                        'alert-success': process.status === 3 }"
         class="list-process alert">

2 Answers2

3

I've found (but not tried yet) this, it's based on Angular Material and Bootstrap 4.x

https://ng-bootstrap.github.io/#/components/alert/examples

It has the same alerts as regular bootstrap (ie: a div that you can insert anywhere, and not a toaster like alert (which are nice too, but not the same usage)

alerts

Thomas
  • 1,231
  • 14
  • 25
-3

You can use a MatSnackBar. https://material.angular.io/components/snack-bar/overview For different looks you can define classes in your global styles and then always open your snack bar with the look you want.

JuNe
  • 1,911
  • 9
  • 28
  • 1
    The author was referring to this : https://getbootstrap.com/docs/3.4/components/#alerts so it doesn't answer the question (but thanks for the reference) – Thomas Sep 02 '20 at 15:08
  • @Thomas You can achieve the same with theming and restyling of the MatSnackbar – JuNe Jun 08 '21 at 13:11