You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use:
let snackContainer = document.getElementById("cdk-overlay-0");
snackContainer.firstElementChild.setAttribute("style","background-color:red");
but the snack-bar disappear.
The text was updated successfully, but these errors were encountered:
I use snack-bar to show notifications. I want to change background color when the response is: error (background: red) or success(background : green).
Code:
let config = new MdSnackBarConfig();
config.duration = 500;
snackBarRef = this.snackBar.open("Message", "", config);
snackBarRef.afterOpened().subscribe(()=>{ });
snackBarRef.afterDismissed().subscribe(()=>{ });
I tried to use:
let snackContainer = document.getElementById("cdk-overlay-0");
snackContainer.firstElementChild.setAttribute("style","background-color:red");
but the snack-bar disappear.
The text was updated successfully, but these errors were encountered: