Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default duration value for MatSnackBar #9821

Closed
udi101 opened this issue Feb 7, 2018 · 1 comment · Fixed by #9849
Closed

Default duration value for MatSnackBar #9821

udi101 opened this issue Feb 7, 2018 · 1 comment · Fixed by #9849
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@udi101
Copy link

udi101 commented Feb 7, 2018

Bug, feature request, or proposal:

What is the expected behavior?

I want all SnackBars in the system to be the same, So the developers will not send their own value and there will be a single variable that effects the duration of all the snackbars of the application.

What is the current behavior?

You have to send the duration in every call to the MatSnackbar.open().

Is there anything else we should know?

There is a way solving this by wrapping to matSnackBar but I prefer to use the original service.

@crisbeto crisbeto self-assigned this Feb 8, 2018
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent has pr labels Feb 8, 2018
crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 8, 2018
Adds the `MAT_SNACK_BAR_DEFAULT_OPTIONS` injection token that allows consumers to set the default snack bar options globally.

Fixes angular#9821.
jelbourn pushed a commit that referenced this issue Feb 12, 2018
Adds the `MAT_SNACK_BAR_DEFAULT_OPTIONS` injection token that allows consumers to set the default snack bar options globally.

Fixes #9821.
tinayuangao pushed a commit that referenced this issue Mar 2, 2018
…ns (#9849)

Adds the `MAT_SNACK_BAR_DEFAULT_OPTIONS` injection token that allows consumers to set the default snack bar options globally.

Fixes #9821.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants