Programmatically close a snackbar.
I can get a snackbar working but i'm not able to close it programmatically. My use case is to show a snackbar Loading... when my app reaches out to the server, then I want to close that snackbar when the server responds. I'm sure it is easy i'm just not sure the lifecycle of the snackbar observable. Thanks!!!
this isn't a covered use case by the snackbar. either you have a timeout or an action. if you do not specify a timeout the default value will be used (2750 ms). you can call hide on the snackbar component - but this will only work if the user did not hit the action or the timeout isn't reached.
this.mdlSnackbarService.showToast('You hit the ok Button').subscribe( (comp) => {
comp.hide();
});
Thanks, I will use something else to show loading.