Skip to content

Commit 7b7901c

Browse files
committedDec 19, 2019
fix: workaround issues with ngIf template vars in Angular 9.0.0-rc.5
details: angular/material.angular.io#689 (comment)
1 parent eed145f commit 7b7901c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed
 

‎material.angular.io/src/app/pages/component-viewer/component-api.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<ng-container *ngIf="componentViewer.componentDocItem | async; let docItem">
22
<span class="cdk-visually-hidden" tabindex="-1" #initialFocusTarget>
3-
API for {{docItem.id}}
3+
API for {{docItem?.id}}
44
</span>
55

66
<span>
77
<doc-viewer
8-
documentUrl="/docs-content/api-docs/{{docItem.packageName}}-{{docItem.id}}.html"
8+
documentUrl="/docs-content/api-docs/{{docItem?.packageName}}-{{docItem?.id}}.html"
99
class="docs-component-view-text-content docs-component-api"
10-
(contentRendered)="updateTableOfContents(docItem.name, $event)">
10+
(contentRendered)="updateTableOfContents(docItem!.name, $event)">
1111
</doc-viewer>
1212

13-
<doc-viewer *ngFor="let additionalApiDoc of docItem.additionalApiDocs"
13+
<doc-viewer *ngFor="let additionalApiDoc of docItem!.additionalApiDocs"
1414
documentUrl="/docs-content/api-docs/{{additionalApiDoc.path}}"
1515
class="docs-component-view-text-content docs-component-api"
1616
(contentRendered)="updateTableOfContents(additionalApiDoc.name, $event)">
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<ng-container *ngIf="componentViewer.componentDocItem | async; let docItem">
22
<span class="cdk-visually-hidden" tabindex="-1" #initialFocusTarget>
3-
Examples for {{docItem.id}}
3+
Examples for {{docItem?.id}}
44
</span>
55
<example-viewer
6-
*ngFor="let example of docItem.examples"
6+
*ngFor="let example of docItem?.examples"
77
[example]="example"></example-viewer>
88
</ng-container>

‎material.angular.io/src/app/pages/component-viewer/component-overview.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<ng-container *ngIf="componentViewer.componentDocItem | async; let docItem">
22
<span class="cdk-visually-hidden" tabindex="-1" #initialFocusTarget>
3-
Overview for {{docItem.id}}
3+
Overview for {{docItem?.id}}
44
</span>
55
<doc-viewer
6-
documentUrl="/docs-content/overviews/{{docItem.packageName}}/{{docItem.id}}.html"
6+
documentUrl="/docs-content/overviews/{{docItem?.packageName}}/{{docItem?.id}}.html"
77
class="docs-component-view-text-content docs-component-overview"
88
(contentRendered)="updateTableOfContents('Overview Content', $event)">
99
</doc-viewer>

0 commit comments

Comments
 (0)