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

feat(snackbar): don't require a ViewContainerRef #1783

Merged
merged 2 commits into from
Nov 9, 2016

Conversation

jelbourn
Copy link
Member

@jelbourn jelbourn commented Nov 9, 2016

R: @josephperrott or @kara

Also lets you use an object literal as the config.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Nov 9, 2016
*/
open(message: string, actionLabel: string,
config: MdSnackBarConfig): MdSnackBarRef<SimpleSnackBar> {
open(message: string, action = '', config?: MdSnackBarConfig): MdSnackBarRef<SimpleSnackBar> {
Copy link
Member

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 = {})...

Copy link
Member Author

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 {
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn jelbourn merged commit 9115538 into angular:master Nov 9, 2016
rolandjitsu pushed a commit to rolandjitsu/material2 that referenced this pull request Nov 10, 2016
* feat(snackbar): don't require a ViewContainerRef

* default config, module method
@jelbourn jelbourn deleted the snackbar-vc-ref branch September 13, 2017 04:37
@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 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants