diff --git a/src/material-examples/chips-autocomplete/chips-autocomplete-example.html b/src/material-examples/chips-autocomplete/chips-autocomplete-example.html
index f5ec61e59b29..1099c6ca73b4 100644
--- a/src/material-examples/chips-autocomplete/chips-autocomplete-example.html
+++ b/src/material-examples/chips-autocomplete/chips-autocomplete-example.html
@@ -4,8 +4,8 @@
*ngFor="let fruit of fruits"
[selectable]="selectable"
[removable]="removable"
- (remove)="remove(fruit)">
- {{fruit.name}}
+ (removed)="remove(fruit)">
+ {{fruit}}
cancel
;
fruits = [
- { name: 'Lemon' },
+ 'Lemon',
];
allFruits = [
- 'Orange',
- 'Strawberry',
- 'Lime',
'Apple',
+ 'Lemon',
+ 'Lime',
+ 'Orange',
+ 'Strawberry'
];
@ViewChild('fruitInput') fruitInput: ElementRef;
@@ -50,7 +51,7 @@ export class ChipsAutocompleteExample {
// Add our fruit
if ((value || '').trim()) {
- this.fruits.push({ name: value.trim() });
+ this.fruits.push(value.trim());
}
// Reset the input value
@@ -73,7 +74,7 @@ export class ChipsAutocompleteExample {
}
selected(event: MatAutocompleteSelectedEvent): void {
- this.fruits.push({ name: event.option.viewValue });
+ this.fruits.push(event.option.viewValue);
this.fruitInput.nativeElement.value = '';
}
}