Skip to content

SnackBarRef component instance ? #6252

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

Closed
fazega opened this issue Aug 3, 2017 · 4 comments
Closed

SnackBarRef component instance ? #6252

fazega opened this issue Aug 3, 2017 · 4 comments
Assignees
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions

Comments

@fazega
Copy link

fazega commented Aug 3, 2017

Bug, feature request, or proposal:

Feature request

What is the expected behavior?

Having a standard for the instance reference and sharing data.

What is the current behavior?

To get the component instance of a SnackBarRef, the attribute is "instance".
To get the component instance of a DialogRef, the attribute is "componentInstance". Besides, in the documentation we can see a method to share data directly has been implemented, it's not the case for SnackBarRef.

What is the use-case or motivation for changing an existing behavior?

I think having a standard for these components "with reference" would be clearer for the user.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Latest of each.

@willshowell
Copy link
Contributor

Agreed that it would be nice to be consistent with componentInstance, but I don't see what you mean about _instance.

https://github.com/angular/material2/blob/master/src/lib/snack-bar/snack-bar-ref.ts#L17-L19

@fazega
Copy link
Author

fazega commented Aug 3, 2017

Oops, i perhaps haven't updated to the latest version, my bad. It was not the central point though ;)
Post edited.

@jelbourn jelbourn added feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions labels Aug 4, 2017
shaunak1111 added a commit to shaunak1111/material2 that referenced this issue Aug 20, 2017
instance is renamed to componentInstance to be consistent with other dialogs

Closes angular#6252
shaunak1111 added a commit to shaunak1111/material2 that referenced this issue Aug 20, 2017
instance is renamed to componentInstance to be consistent with other dialogs

Closes angular#6252
shaunak1111 added a commit to shaunak1111/material2 that referenced this issue Aug 23, 2017
instance is renamed to componentInstance to be consistent with other dialogs

Closes angular#6252
shaunak1111 added a commit to shaunak1111/material2 that referenced this issue Sep 18, 2017
BREAKING CHANGE: Renamed instance to componentInstance to be consistent with other dialogs

Closes angular#6252
shaunak1111 added a commit to shaunak1111/material2 that referenced this issue Sep 19, 2017
BREAKING CHANGE: Renamed variable instance to componentInstance to be consistent with other dialogs

Closes angular#6252
@jelbourn
Copy link
Member

jelbourn commented Jan 9, 2018

Closing this since, after releasing 5.0.0, we aren't making any more breaking API changes.

@jelbourn jelbourn closed this as completed Jan 9, 2018
@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
feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
3 participants