Components: Undocumented BREAKING CHANGES

Created on 10 Apr 2017  路  7Comments  路  Source: angular/components

@jelbourn Hi,

While upgrading I found some undocumented breaking changes.

  • the config property is no longer part of MdDialogRef, now one needs to inject the MD_DIALOG_DATA token

  • DomProjectionHost and DomProjection are no longer part of @angular/material, couldn't find a replacement of documentation for it.

this is it for now

P2

Most helpful comment

@shlomiassaf you can access to the dialog config via the following property

export class DialogComponent {
  constructor(private dialog: MdDialogRef<any>) {
    const config = dialog._containerInstance.dialogConfig;
  }
}

All 7 comments

@shlomiassaf you can access to the dialog config via the following property

export class DialogComponent {
  constructor(private dialog: MdDialogRef<any>) {
    const config = dialog._containerInstance.dialogConfig;
  }
}

I didn't try.

The _containerInstance seems like a private variable so I wouldn't want to use it and later face issues.

anyway, the MD_DIALOG_DATA is how to get the data now...

Yes but MD_DIALOG_DATA allows you to retrive dialogConfig via DialogInjector but dialogInjector reference seems to be not exposed.

I don't understand what you mean...
MD_DIALOG_DATA returns the data object supplied to the confit.

I don't think the config exposed.

Should this be closed by #4126?

Yes

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

theunreal picture theunreal  路  3Comments

savaryt picture savaryt  路  3Comments

jelbourn picture jelbourn  路  3Comments

crutchcorn picture crutchcorn  路  3Comments

julianobrasil picture julianobrasil  路  3Comments