Skip to content

Conversation

@crisbeto
Copy link
Member

Adds a default value for the MD_DIALOG_DATA injection token, instead of throwing an error when it's not defined.

Fixes #4086.

Adds a default value for the `MD_DIALOG_DATA` injection token, instead of throwing an error when it's not defined.

Fixes angular#4086.
@crisbeto crisbeto requested a review from jelbourn April 17, 2017 12:45
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Apr 17, 2017

/** Data being injected into the child component. */
data?: any;
data?: any = {};
Copy link
Member

Choose a reason for hiding this comment

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

How about null instead of {}?

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.

Copy link
Member

@jelbourn jelbourn 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 added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Apr 17, 2017
@kara kara merged commit d1128fe into angular:master Apr 21, 2017
@xtianus79
Copy link

oddly I am gettig this error in a popup window... i.e. window.open... I know the values can't be passed there so I will try @optional()

@xtianus79
Copy link

that was scary lol... @optional did the trick... I feel like this should just be obvious without dragging something in.

@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker 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.

ERROR Error: No provider for Token MdDialogData!

5 participants