-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
feat(snackbar): don't require a ViewContainerRef #1783
Conversation
*/ | ||
open(message: string, actionLabel: string, | ||
config: MdSnackBarConfig): MdSnackBarRef<SimpleSnackBar> { | ||
open(message: string, action = '', config?: MdSnackBarConfig): MdSnackBarRef<SimpleSnackBar> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to not just set a default config of {}?
open(message: string, action = '', config: MdSnackBarConfig = {})...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
* @param config The configuration to which the defaults will be applied. | ||
* @returns The new configuration object with defaults applied. | ||
*/ | ||
private _applyConfigDefaults(config: MdSnackBarConfig): MdSnackBarConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be a module level method, or static even?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to non-exported module function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* feat(snackbar): don't require a ViewContainerRef * default config, module method
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
R: @josephperrott or @kara
Also lets you use an object literal as the config.