doc(autocomplete-filter): Update example to use Array.prototype.Inclues() (#10779)

Was researching the Auto-complete feature to add it to a project and this little enhancement is more straightforward when dealing with more complex strings.

Current example can't filter words with spaces. By using includes() it can filter full sentences.
This commit is contained in:
Tony
2018-04-13 15:27:54 -07:00
committed by tinayuangao
parent 0a3cfa7934
commit 6a5a6fbdc6
@@ -33,7 +33,7 @@ export class AutocompleteFilterExample {
filter(val: string): string[] {
return this.options.filter(option =>
option.toLowerCase().indexOf(val.toLowerCase()) === 0);
option.toLowerCase().includes(val.toLowerCase()));
}
}