-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(tree):clean up flat tree example
clean up flat tree example and use element to update doc site
- Loading branch information
Vivian Hu
committed
Dec 6, 2018
1 parent
63be232
commit 8742959
Showing
7 changed files
with
134 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/material-examples/cdk-tree-flat/cdk-tree-flat-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<cdk-tree [dataSource]="dataSource" [treeControl]="treeControl"> | ||
<cdk-tree-node *cdkTreeNodeDef="let node" cdkTreeNodePadding class="example-tree-node"> | ||
<button mat-icon-button disabled></button> | ||
{{node.filename}}: {{node.type}} | ||
{{node.name}} | ||
</cdk-tree-node> | ||
<cdk-tree-node *cdkTreeNodeDef="let node; when: hasChild" cdkTreeNodePadding class="example-tree-node"> | ||
<button mat-icon-button [attr.aria-label]="'toggle ' + node.filename" cdkTreeNodeToggle> | ||
<mat-icon class="mat-icon-rtl-mirror"> | ||
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}} | ||
</mat-icon> | ||
</button> | ||
{{node.filename}}: {{node.type}} | ||
{{node.name}} | ||
</cdk-tree-node> | ||
</cdk-tree> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 8 additions & 3 deletions
11
src/material-examples/tree-flat-overview/tree-flat-overview-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl"> | ||
<mat-tree-node *matTreeNodeDef="let node" matTreeNodeToggle matTreeNodePadding> | ||
<button mat-icon-button disabled></button> | ||
{{node.filename}} : {{node.type}} | ||
{{node.name}} | ||
</mat-tree-node> | ||
|
||
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding> | ||
<button mat-icon-button matTreeNodeToggle | ||
[attr.aria-label]="'toggle ' + node.filename"> | ||
[attr.aria-label]="'toggle ' + node.name"> | ||
<mat-icon class="mat-icon-rtl-mirror"> | ||
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}} | ||
</mat-icon> | ||
</button> | ||
{{node.filename}} : {{node.type}} | ||
{{node.name}} | ||
</mat-tree-node> | ||
</mat-tree> | ||
|
||
|
||
<!-- Copyright 2018 Google Inc. All Rights Reserved. | ||
Use of this source code is governed by an MIT-style license that | ||
can be found in the LICENSE file at http://angular.io/license --> |
Oops, something went wrong.