|
6 | 6 | * found in the LICENSE file at https://angular.io/license
|
7 | 7 | */
|
8 | 8 |
|
9 |
| -import {Component, inject, ViewChild} from '@angular/core'; |
10 |
| -import {FormControl, NgModel, FormsModule, ReactiveFormsModule} from '@angular/forms'; |
11 | 9 | import {CommonModule} from '@angular/common';
|
| 10 | +import {ChangeDetectionStrategy, Component, inject, ViewChild} from '@angular/core'; |
| 11 | +import {FormControl, FormsModule, NgModel, ReactiveFormsModule} from '@angular/forms'; |
12 | 12 | import {MatAutocompleteModule} from '@angular/material/autocomplete';
|
13 | 13 | import {MatButtonModule} from '@angular/material/button';
|
14 | 14 | import {MatCardModule} from '@angular/material/card';
|
15 | 15 | import {MatCheckboxModule} from '@angular/material/checkbox';
|
16 |
| -import {MatInputModule} from '@angular/material/input'; |
17 | 16 | import {ThemePalette} from '@angular/material/core';
|
18 | 17 | import {MatDialog, MatDialogRef} from '@angular/material/dialog';
|
| 18 | +import {MatInputModule} from '@angular/material/input'; |
19 | 19 |
|
20 | 20 | export interface State {
|
21 | 21 | code: string;
|
@@ -45,6 +45,7 @@ type DisableStateOption = 'none' | 'first-middle-last' | 'all';
|
45 | 45 | MatInputModule,
|
46 | 46 | ReactiveFormsModule,
|
47 | 47 | ],
|
| 48 | + changeDetection: ChangeDetectionStrategy.OnPush, |
48 | 49 | })
|
49 | 50 | export class AutocompleteDemo {
|
50 | 51 | stateCtrl = new FormControl();
|
@@ -246,6 +247,7 @@ export class AutocompleteDemo {
|
246 | 247 | `,
|
247 | 248 | standalone: true,
|
248 | 249 | imports: [CommonModule, FormsModule, MatAutocompleteModule, MatButtonModule, MatInputModule],
|
| 250 | + changeDetection: ChangeDetectionStrategy.OnPush, |
249 | 251 | })
|
250 | 252 | export class AutocompleteDemoExampleDialog {
|
251 | 253 | constructor(public dialogRef: MatDialogRef<AutocompleteDemoExampleDialog>) {}
|
|
0 commit comments