I can set the duration of a snackbar message like so
let config = new MdSnackBarConfig();
config.duration = 5000;
this.snackBar.open(element.text, 'OK', config);
However I need to set the duration for multiple snackbars and would rather not have to pass in the config each time.
Can I somehow set a global duration config?
Thanks!
What we've done is included an external app.config.ts file at the module level and include it where we need it. This is an example of what's in the file.
Then, all you have to do is declare it in your module and then import it in the component or service in which you want to use it. Here is an example.