From 0e4c1b726a101c2b3c745a4432620ad6593ff95e Mon Sep 17 00:00:00 2001 From: Andrew Crites Date: Thu, 6 Apr 2017 18:49:24 -0400 Subject: [PATCH] docs(select): correctly document usage for selected elements (#10969) The current documentation has `selected="true"` combined with `ngModel` binding, but this does not work. In fact, the demo on the page does not use `selected`. I removed this from the example code. I also added a paragraph explaining how to set an option as selected. --- src/components/select/select.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/select/select.ts b/src/components/select/select.ts index 2e88600d6c..96670089db 100644 --- a/src/components/select/select.ts +++ b/src/components/select/select.ts @@ -30,6 +30,10 @@ export const SELECT_VALUE_ACCESSOR: any = { * The select component takes child `ion-option` components. If `ion-option` is not * given a `value` attribute then it will use its text as the value. * + * If `ngModel` is bound to `ion-select`, the selected value will be based on the + * bound value of the model. Otherwise, the `selected` attribute can be used on + * `ion-option` components. + * * ### Interfaces * * By default, the `ion-select` uses the {@link ../../alert/AlertController AlertController API} @@ -51,7 +55,7 @@ export const SELECT_VALUE_ACCESSOR: any = { * * Gender * - * Female + * Female * Male * *