Skip to content

Commit 5d335a5

Browse files
committed
docs(material/chips): describe how to use chips in forms
Updated indentation
1 parent ff72b61 commit 5d335a5

File tree

2 files changed

+38
-38
lines changed

2 files changed

+38
-38
lines changed
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<section>
2-
<h4>Chips inside of a Reactive form</h4>
3-
<mat-form-field class="example-form-field">
4-
<mat-label>Video keywords</mat-label>
5-
<mat-chip-grid #reactiveChipGrid aria-label="Enter reactive form keywords" [formControl]="formControl">
6-
@for (keyword of reactiveKeywords(); track keyword) {
7-
<mat-chip-row (removed)="removeReactiveKeyword(keyword)">
8-
{{keyword}}
9-
<button matChipRemove aria-label="'remove reactive form' + keyword">
10-
<mat-icon>cancel</mat-icon>
11-
</button>
12-
</mat-chip-row>
13-
}
14-
</mat-chip-grid>
15-
<input
16-
placeholder="New keyword..."
17-
[matChipInputFor]="reactiveChipGrid"
18-
(matChipInputTokenEnd)="addReactiveKeyword($event)"
19-
/>
20-
</mat-form-field>
2+
<h4>Chips inside of a Reactive form</h4>
3+
<mat-form-field class="example-form-field">
4+
<mat-label>Video keywords</mat-label>
5+
<mat-chip-grid #reactiveChipGrid aria-label="Enter reactive form keywords" [formControl]="formControl">
6+
@for (keyword of reactiveKeywords(); track keyword) {
7+
<mat-chip-row (removed)="removeReactiveKeyword(keyword)">
8+
{{keyword}}
9+
<button matChipRemove aria-label="'remove reactive form' + keyword">
10+
<mat-icon>cancel</mat-icon>
11+
</button>
12+
</mat-chip-row>
13+
}
14+
</mat-chip-grid>
15+
<input
16+
placeholder="New keyword..."
17+
[matChipInputFor]="reactiveChipGrid"
18+
(matChipInputTokenEnd)="addReactiveKeyword($event)"
19+
/>
20+
</mat-form-field>
2121
</section>
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<section>
2-
<h4>Chips inside of a Template-driven form</h4>
3-
<mat-form-field class="example-form-field">
4-
<mat-label>Video keywords</mat-label>
5-
<mat-chip-grid #templateChipGrid aria-label="Enter template form keywords" [(ngModel)]="templateKeywords">
6-
@for (keyword of templateKeywords(); track keyword) {
7-
<mat-chip-row (removed)="removeTemplateKeyword(keyword)">
8-
{{keyword}}
9-
<button matChipRemove aria-label="'remove template form' + keyword">
10-
<mat-icon>cancel</mat-icon>
11-
</button>
12-
</mat-chip-row>
13-
}
14-
</mat-chip-grid>
15-
<input
16-
placeholder="New keyword..."
17-
[matChipInputFor]="templateChipGrid"
18-
(matChipInputTokenEnd)="addTemplateKeyword($event)"
19-
/>
20-
</mat-form-field>
2+
<h4>Chips inside of a Template-driven form</h4>
3+
<mat-form-field class="example-form-field">
4+
<mat-label>Video keywords</mat-label>
5+
<mat-chip-grid #templateChipGrid aria-label="Enter template form keywords" [(ngModel)]="templateKeywords">
6+
@for (keyword of templateKeywords(); track keyword) {
7+
<mat-chip-row (removed)="removeTemplateKeyword(keyword)">
8+
{{keyword}}
9+
<button matChipRemove aria-label="'remove template form' + keyword">
10+
<mat-icon>cancel</mat-icon>
11+
</button>
12+
</mat-chip-row>
13+
}
14+
</mat-chip-grid>
15+
<input
16+
placeholder="New keyword..."
17+
[matChipInputFor]="templateChipGrid"
18+
(matChipInputTokenEnd)="addTemplateKeyword($event)"
19+
/>
20+
</mat-form-field>
2121
</section>

0 commit comments

Comments
 (0)