From 98fc499341fe8363498830f5f6302e81cb9be81a Mon Sep 17 00:00:00 2001 From: Mac Date: Thu, 23 Mar 2017 15:10:16 -0700 Subject: [PATCH 1/6] MdDialogConfig docs #3651 I think this comment should be that large because its a rather specific definition. and is a more advanced component. Based on https://github.com/angular/material2/blob/master/src/lib/core/portal/portal.ts#L79 --- src/lib/dialog/dialog-config.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/dialog/dialog-config.ts b/src/lib/dialog/dialog-config.ts index 37337591776f..bb02a1f921ea 100644 --- a/src/lib/dialog/dialog-config.ts +++ b/src/lib/dialog/dialog-config.ts @@ -15,6 +15,10 @@ export interface DialogPosition { * Configuration for opening a modal dialog with the MdDialog service. */ export class MdDialogConfig { + + /** Where the attached component should live in Angular's *logical* component tree. + * This is different from where the component *renders*, which is determined by the PortalHost (the component that was passed into the MdDialog). + * Note the origin is necessary when the host is outside of the Angular application context. */ viewContainerRef?: ViewContainerRef; /** The ARIA role of the dialog element. */ From 845f748d20c631d9d1310f78c7c569f82a5a908e Mon Sep 17 00:00:00 2001 From: Mac Date: Thu, 23 Mar 2017 15:29:52 -0700 Subject: [PATCH 2/6] Update dialog-config.ts Fixed lint. more specific, added MdDialog.open(). --- src/lib/dialog/dialog-config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/dialog/dialog-config.ts b/src/lib/dialog/dialog-config.ts index bb02a1f921ea..33d624965a9d 100644 --- a/src/lib/dialog/dialog-config.ts +++ b/src/lib/dialog/dialog-config.ts @@ -17,7 +17,8 @@ export interface DialogPosition { export class MdDialogConfig { /** Where the attached component should live in Angular's *logical* component tree. - * This is different from where the component *renders*, which is determined by the PortalHost (the component that was passed into the MdDialog). + * This is different from where the component *renders*, which is determined by + * the PortalHost (the component that was passed into MdDialog.open(). * Note the origin is necessary when the host is outside of the Angular application context. */ viewContainerRef?: ViewContainerRef; From ae6f88b74f4202beb699404dbea56d010a287e76 Mon Sep 17 00:00:00 2001 From: Mac Date: Thu, 23 Mar 2017 15:35:01 -0700 Subject: [PATCH 3/6] Update dialog-config.ts --- src/lib/dialog/dialog-config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/dialog/dialog-config.ts b/src/lib/dialog/dialog-config.ts index 33d624965a9d..b8c0256b5f51 100644 --- a/src/lib/dialog/dialog-config.ts +++ b/src/lib/dialog/dialog-config.ts @@ -15,9 +15,9 @@ export interface DialogPosition { * Configuration for opening a modal dialog with the MdDialog service. */ export class MdDialogConfig { - + /** Where the attached component should live in Angular's *logical* component tree. - * This is different from where the component *renders*, which is determined by + * This is different from where the component *renders*, which is determined by * the PortalHost (the component that was passed into MdDialog.open(). * Note the origin is necessary when the host is outside of the Angular application context. */ viewContainerRef?: ViewContainerRef; From 6fa04ac9ecf717c38a54943666caf489fc5f2584 Mon Sep 17 00:00:00 2001 From: Mac Date: Fri, 24 Mar 2017 15:19:44 -0700 Subject: [PATCH 4/6] Recommended change More accurate wording This affects what is available for injection and the change detection order for the component instantiated inside of the dialog --- src/lib/dialog/dialog-config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/dialog/dialog-config.ts b/src/lib/dialog/dialog-config.ts index b8c0256b5f51..12dffc29b2d2 100644 --- a/src/lib/dialog/dialog-config.ts +++ b/src/lib/dialog/dialog-config.ts @@ -17,9 +17,9 @@ export interface DialogPosition { export class MdDialogConfig { /** Where the attached component should live in Angular's *logical* component tree. - * This is different from where the component *renders*, which is determined by - * the PortalHost (the component that was passed into MdDialog.open(). - * Note the origin is necessary when the host is outside of the Angular application context. */ + * This affects what is available for injection and the change detection order for the + * component instantiated inside of the dialog. This does not affect where the dialog + * content will be rendered. */ viewContainerRef?: ViewContainerRef; /** The ARIA role of the dialog element. */ From 81384035b981f38ec2d1104abee28cb28e85786d Mon Sep 17 00:00:00 2001 From: Mac Date: Sat, 25 Mar 2017 22:39:57 -0700 Subject: [PATCH 5/6] Formatting --- src/lib/dialog/dialog-config.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/dialog/dialog-config.ts b/src/lib/dialog/dialog-config.ts index 12dffc29b2d2..1e091fd243b6 100644 --- a/src/lib/dialog/dialog-config.ts +++ b/src/lib/dialog/dialog-config.ts @@ -16,10 +16,12 @@ export interface DialogPosition { */ export class MdDialogConfig { - /** Where the attached component should live in Angular's *logical* component tree. + /** + * Where the attached component should live in Angular's *logical* component tree. * This affects what is available for injection and the change detection order for the * component instantiated inside of the dialog. This does not affect where the dialog - * content will be rendered. */ + * content will be rendered. + */ viewContainerRef?: ViewContainerRef; /** The ARIA role of the dialog element. */ From 4e0b44c86791f9f43af21a5f6d0099d72dc5aec9 Mon Sep 17 00:00:00 2001 From: Mac Date: Sat, 25 Mar 2017 22:54:46 -0700 Subject: [PATCH 6/6] Fixed alignment of * --- src/lib/dialog/dialog-config.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/dialog/dialog-config.ts b/src/lib/dialog/dialog-config.ts index 1e091fd243b6..30870ff7ef9a 100644 --- a/src/lib/dialog/dialog-config.ts +++ b/src/lib/dialog/dialog-config.ts @@ -17,11 +17,11 @@ export interface DialogPosition { export class MdDialogConfig { /** - * Where the attached component should live in Angular's *logical* component tree. - * This affects what is available for injection and the change detection order for the - * component instantiated inside of the dialog. This does not affect where the dialog - * content will be rendered. - */ + * Where the attached component should live in Angular's *logical* component tree. + * This affects what is available for injection and the change detection order for the + * component instantiated inside of the dialog. This does not affect where the dialog + * content will be rendered. + */ viewContainerRef?: ViewContainerRef; /** The ARIA role of the dialog element. */