From 9a4b6bb9b02c97e743e1cbd8396c6e7b2cf0144f Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Fri, 5 Feb 2016 14:43:16 -0500 Subject: [PATCH] docs(demos): add demo for select references driftyco/ionic-site#397 --- demos/select/index.ts | 30 +++++++ demos/select/main.html | 135 ++++++++++++++++++++++++++++++ ionic/components/select/select.ts | 3 +- 3 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 demos/select/index.ts create mode 100644 demos/select/main.html diff --git a/demos/select/index.ts b/demos/select/index.ts new file mode 100644 index 0000000000..13d1222f64 --- /dev/null +++ b/demos/select/index.ts @@ -0,0 +1,30 @@ +import {App, Page} from 'ionic/ionic'; + +@App({ + template: '' +}) +class ApiDemoApp { + constructor() { + this.root = MainPage; + } +} + +@Page({ + templateUrl: 'main.html' +}) +class MainPage { + constructor() { + this.musicAlertOpts = { + title: '1994 Music', + subTitle: 'Select your favorite' + }; + + this.petOptions = [ + { text: 'Bird', value: 'bird' }, + { text: 'Cat', value: 'cat', checked: true }, + { text: 'Dog', value: 'dog', checked: true }, + { text: 'Honey Badger', value: 'honeybadger' }, + { text: 'Pig', value: 'pig' }, + ]; + } +} diff --git a/demos/select/main.html b/demos/select/main.html new file mode 100644 index 0000000000..4a4400adbc --- /dev/null +++ b/demos/select/main.html @@ -0,0 +1,135 @@ + + Select + + + + + + Single Value Select + + + Gender + + Female + Male + + + + + Gaming + + NES + Nintendo64 + PlayStation + Sega Genesis + Sega Saturn + SNES + + + + + Operating System + + DOS + Linux + Mac OS 7 + Mac OS 8 + Windows 3.1 + Windows 95 + Windows 98 + + + + + Music + + Alice in Chains + Green Day + Nirvana + Pearl Jam + Smashing Pumpkins + Soundgarden + Stone Temple Pilots + + + + + Date + + January + February + March + April + May + June + July + August + September + October + November + December + + + 1989 + 1990 + 1991 + 1992 + 1993 + 1994 + 1995 + 1996 + 1997 + 1998 + 1999 + + + + + + + Multiple Value Select + + + Toppings + + Bacon + Black Olives + Extra Cheese + Green Peppers + Mushrooms + Onions + Pepperoni + Pineapple + Sausage + Spinach + + + + + Car Features + + Backup Camera + Headted Seats + Keyless Entry + Navigation + Parking Assist + Sun Roof + + + + + Pets + + {{o.text}} + + + + + Disabled + + Selected Text + + + + + diff --git a/ionic/components/select/select.ts b/ionic/components/select/select.ts index 272147659b..d17e7e7887 100644 --- a/ionic/components/select/select.ts +++ b/ionic/components/select/select.ts @@ -98,7 +98,8 @@ import {Option} from '../option/option'; * @property [multiple] - Whether or not the select component can accept multipl selections * @property [disabled] - Whether or not the select component is disabled or not * @property (change) - Any expression you want to evaluate when the selection has changed - + * + * @demo /docs/v2/demos/select/ */ @Component({ selector: 'ion-select',