diff --git a/CHANGELOG.md b/CHANGELOG.md index c639e2cdaa..48f042400c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,14 @@ * **action-sheet:** Button `style` property renamed to `role` ([1c618b5](https://github.com/driftyco/ionic/commit/1c618b51eb0a31013f7d3509d34c796d65689836#diff-f61014c4fb6e166fa1b5645d126dd4f6L26)) +##### Angular was updated to Beta 2 + +* Update the version of Angular in your `package.json` file: + + ``` + "angular2": "2.0.0-beta.2", + ``` + # 2.0.0-alpha.53 (2016-01-28) diff --git a/demos/action-sheet/main.html b/demos/action-sheet/main.html index 0bd9c249f9..2edfbc70c4 100644 --- a/demos/action-sheet/main.html +++ b/demos/action-sheet/main.html @@ -2,6 +2,7 @@ Action Sheet - - + + + diff --git a/demos/alert/app.html b/demos/alert/app.html new file mode 100644 index 0000000000..7b88c96996 --- /dev/null +++ b/demos/alert/app.html @@ -0,0 +1 @@ + diff --git a/demos/alert/index.ts b/demos/alert/index.ts new file mode 100644 index 0000000000..6897e457ff --- /dev/null +++ b/demos/alert/index.ts @@ -0,0 +1,220 @@ +import {App, Page, Alert, NavController} from 'ionic/ionic'; + + +@App({ + templateUrl: 'app.html' +}) +class ApiDemoApp { + constructor() { + this.rootPage = InitialPage; + } +} + + +@Page({ + templateUrl: 'main.html' +}) +export class InitialPage { + constructor(nav: NavController) { + this.nav = nav; + } + + doAlert() { + let alert = Alert.create({ + title: 'New Friend!', + subTitle: 'Your friend, Obi wan Kenobi, just accepted your friend request!', + buttons: ['Ok'] + }); + + this.nav.present(alert); + } + + doConfirm() { + let alert = Alert.create({ + title: 'Use this lightsaber?', + body: 'Do you agree to use this lightsaber to do good across the intergalactic galaxy?', + buttons: [ + { + text: 'Disagree', + handler: () => { + console.log('Disagree clicked'); + } + }, + { + text: 'Agree', + handler: () => { + console.log('Agree clicked'); + } + } + ] + }); + + this.nav.present(alert); + } + + doPrompt() { + let alert = Alert.create({ + title: 'Login', + body: "Enter a name for this new album you're so keen on adding", + inputs: [ + { + name: 'title', + placeholder: 'Title' + }, + ], + buttons: [ + { + text: 'Cancel', + handler: data => { + console.log('Cancel clicked'); + } + }, + { + text: 'Save', + handler: data => { + console.log('Saved clicked'); + } + } + ] + }); + + this.nav.present(alert); + } + + doRadio() { + let alert = Alert.create(); + alert.setTitle('Lightsaber color'); + + alert.addInput({ + type: 'radio', + label: 'Blue', + value: 'blue', + checked: true + }); + + alert.addInput({ + type: 'radio', + label: 'Green', + value: 'green' + }); + + alert.addInput({ + type: 'radio', + label: 'Red', + value: 'red' + }); + + alert.addInput({ + type: 'radio', + label: 'Yellow', + value: 'yellow' + }); + + alert.addInput({ + type: 'radio', + label: 'Purple', + value: 'purple' + }); + + alert.addInput({ + type: 'radio', + label: 'White', + value: 'white' + }); + + alert.addInput({ + type: 'radio', + label: 'Black', + value: 'black' + }); + + alert.addButton('Cancel'); + alert.addButton({ + text: 'Ok', + handler: data => { + console.log('Radio data:', data); + this.testRadioOpen = false; + this.testRadioResult = data; + } + }); + + this.nav.present(alert); + } + + doCheckbox() { + let alert = Alert.create(); + alert.setTitle('Which planets have you visited?'); + + alert.addInput({ + type: 'checkbox', + label: 'Alderaan', + value: 'value1', + checked: true + }); + + alert.addInput({ + type: 'checkbox', + label: 'Bespin', + value: 'value2' + }); + + alert.addInput({ + type: 'checkbox', + label: 'Coruscant', + value: 'value3' + }); + + alert.addInput({ + type: 'checkbox', + label: 'Endor', + value: 'value4' + }); + + alert.addInput({ + type: 'checkbox', + label: 'Hoth', + value: 'value5' + }); + + alert.addInput({ + type: 'checkbox', + label: 'Jakku', + value: 'value6' + }); + + alert.addInput({ + type: 'checkbox', + label: 'Naboo', + value: 'value6' + }); + + alert.addInput({ + type: 'checkbox', + label: 'Takodana', + value: 'value6' + }); + + alert.addInput({ + type: 'checkbox', + label: 'Tatooine', + value: 'value6' + }); + + alert.addButton('Cancel'); + alert.addButton({ + text: 'Okay', + handler: data => { + console.log('Checkbox data:', data); + this.testCheckboxOpen = false; + this.testCheckboxResult = data; + } + }); + + this.nav.present(alert); + } + + doCustomAnimation() { + + } + +} diff --git a/demos/alert/main.html b/demos/alert/main.html new file mode 100644 index 0000000000..30d0896fd9 --- /dev/null +++ b/demos/alert/main.html @@ -0,0 +1,12 @@ + + Alert + + + + + + + + + + diff --git a/demos/blur/index.ts b/demos/blur/index.ts index 00bd916c6b..405e893db7 100644 --- a/demos/blur/index.ts +++ b/demos/blur/index.ts @@ -3,8 +3,4 @@ import {App} from 'ionic/ionic'; @App({ templateUrl: 'main.html' }) - -class DemoApp { - blur() { - } -} +class ApiDemoApp {} diff --git a/demos/buttons/index.ts b/demos/button/index.ts similarity index 78% rename from demos/buttons/index.ts rename to demos/button/index.ts index 35861ee71b..405e893db7 100644 --- a/demos/buttons/index.ts +++ b/demos/button/index.ts @@ -3,5 +3,4 @@ import {App} from 'ionic/ionic'; @App({ templateUrl: 'main.html' }) - -class DemoApp {} \ No newline at end of file +class ApiDemoApp {} diff --git a/demos/button/main.html b/demos/button/main.html new file mode 100644 index 0000000000..2ce4c2493e --- /dev/null +++ b/demos/button/main.html @@ -0,0 +1,64 @@ + + + Button + + + + +

Colors

+ + + + + + + + + + + +

Shapes

+ + + + + + + + + +

Outlines

+ + + + + + + + + +

Icons

+ + + + + + + +

Sizes

+ + + + + + + +
diff --git a/demos/buttons/main.html b/demos/buttons/main.html deleted file mode 100644 index 6efc84cddc..0000000000 --- a/demos/buttons/main.html +++ /dev/null @@ -1,104 +0,0 @@ - - - Buttons - - - - - -

Colors

- -

- -

- -

- -

- -

- -

- -

- -

- -

- -

- -

Shapes

- -

- -

- -

- -

- -

- -

- -

- -

- -

Outlines

- -

- -

- -

- -

- -

- -

- -

- -

- -

Icons

- -

- -

- -

- -

- -

- -

- - -

Sizes

- -

- -

- -

- -

- -

- -

- -
diff --git a/demos/checkbox/app.html b/demos/checkbox/app.html deleted file mode 100644 index 5f6bb33d68..0000000000 --- a/demos/checkbox/app.html +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/demos/checkbox/index.ts b/demos/checkbox/index.ts index a1884eb2c1..405e893db7 100644 --- a/demos/checkbox/index.ts +++ b/demos/checkbox/index.ts @@ -1,20 +1,6 @@ -import {App, Page, IonicApp} from 'ionic/ionic'; +import {App} from 'ionic/ionic'; @App({ - templateUrl: 'app.html' -}) -class ApiDemoApp { - - constructor() { - this.rootPage = InitialPage; - } -} - -@Page({ templateUrl: 'main.html' }) -export class InitialPage { - constructor() { - } -} - +class ApiDemoApp {} diff --git a/demos/checkbox/main.html b/demos/checkbox/main.html index 7e147a9f04..66b3e9e555 100644 --- a/demos/checkbox/main.html +++ b/demos/checkbox/main.html @@ -1,6 +1,6 @@ - + Checkbox - + diff --git a/demos/config/index.html b/demos/config/index.html index e8dda7ea3d..49f6db8d67 100644 --- a/demos/config/index.html +++ b/demos/config/index.html @@ -20,19 +20,6 @@ - diff --git a/demos/config/main.html b/demos/config/main.html index a0701bbb0d..bb19934caf 100644 --- a/demos/config/main.html +++ b/demos/config/main.html @@ -50,7 +50,7 @@ })
-
diff --git a/demos/hide-when/index.ts b/demos/hide-when/index.ts index a1884eb2c1..405e893db7 100644 --- a/demos/hide-when/index.ts +++ b/demos/hide-when/index.ts @@ -1,20 +1,6 @@ -import {App, Page, IonicApp} from 'ionic/ionic'; +import {App} from 'ionic/ionic'; @App({ - templateUrl: 'app.html' -}) -class ApiDemoApp { - - constructor() { - this.rootPage = InitialPage; - } -} - -@Page({ templateUrl: 'main.html' }) -export class InitialPage { - constructor() { - } -} - +class ApiDemoApp {} diff --git a/demos/hide-when/main.html b/demos/hide-when/main.html index 12e4d4c157..276139286a 100644 --- a/demos/hide-when/main.html +++ b/demos/hide-when/main.html @@ -1,30 +1,33 @@ - + HideWhen - + - -
If the platform is Android, it will hide the Apple logo. If the platform is iOS, it will hide the Android logo.
+ +
Hide Icon Per Platform
+

In this example we're using the hideWhen directive to decide whether to hide an icon based on the platform.

-
-
- <div hideWhen="ios"> -
-
-
- <div hideWhen="android"> -
+ + + + + + + +
diff --git a/demos/icon/index.ts b/demos/icon/index.ts new file mode 100644 index 0000000000..405e893db7 --- /dev/null +++ b/demos/icon/index.ts @@ -0,0 +1,6 @@ +import {App} from 'ionic/ionic'; + +@App({ + templateUrl: 'main.html' +}) +class ApiDemoApp {} diff --git a/demos/icon/main.html b/demos/icon/main.html new file mode 100644 index 0000000000..7897a7aee8 --- /dev/null +++ b/demos/icon/main.html @@ -0,0 +1,71 @@ + + Icon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demos/label/app.html b/demos/label/app.html deleted file mode 100644 index 776be9a94a..0000000000 --- a/demos/label/app.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/demos/label/index.ts b/demos/label/index.ts index a1884eb2c1..405e893db7 100644 --- a/demos/label/index.ts +++ b/demos/label/index.ts @@ -1,20 +1,6 @@ -import {App, Page, IonicApp} from 'ionic/ionic'; +import {App} from 'ionic/ionic'; @App({ - templateUrl: 'app.html' -}) -class ApiDemoApp { - - constructor() { - this.rootPage = InitialPage; - } -} - -@Page({ templateUrl: 'main.html' }) -export class InitialPage { - constructor() { - } -} - +class ApiDemoApp {} diff --git a/demos/label/ionic.svg b/demos/label/ionic.svg new file mode 100644 index 0000000000..d8008379ff --- /dev/null +++ b/demos/label/ionic.svg @@ -0,0 +1,19 @@ + + + + + + + + + + diff --git a/demos/label/main.html b/demos/label/main.html index 8b7c54c4ad..96bf6cbbd0 100644 --- a/demos/label/main.html +++ b/demos/label/main.html @@ -1,32 +1,68 @@ - + Label - + - - - - + + + + + + + Ionic - - + - Fixed Label - + Mobile + + + - - - Floating Label - + Email + - - - Stacked Label - + Birthday + - + + + Address + + + + + + Notes + + + + + + +
+ + diff --git a/demos/list/app.html b/demos/list/app.html deleted file mode 100644 index 8a93be64ff..0000000000 --- a/demos/list/app.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - Menu - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/demos/list/basic-list.html b/demos/list/basic-list.html deleted file mode 100644 index b73d04819a..0000000000 --- a/demos/list/basic-list.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - Basic List - - - - - - - - - - List Header - - - - - Wifi - - - - - - Affection - - Very Little - - - - - - Home - - Where the heart is - - - - - - Magic - - - - - - Star status - - Super - - - - - - Pizza - - Always - - - - - - Beer - - Yes Plz - - - - - - Wine - - All the time - - - - - - - diff --git a/demos/list/index.ts b/demos/list/index.ts index 6195778ebd..405e893db7 100644 --- a/demos/list/index.ts +++ b/demos/list/index.ts @@ -1,71 +1,6 @@ -import {App, IonicApp, Page, Platform} from 'ionic/ionic'; - +import {App} from 'ionic/ionic'; @App({ - templateUrl: 'app.html' + templateUrl: 'main.html' }) -class ApiDemoApp { - - constructor(app: IonicApp, platform: Platform) { - this.app = app; - this.platform = platform; - this.rootPage = PageOne; - this.pages = [ - { title: 'Basic List', component: PageOne }, - { title: 'Inset List', component: PageTwo }, - { title: 'No-lines List', component: PageThree }, - { title: 'List Headers', component: PageFour }, - { title: 'Sliding Items', component: PageFive }, - - - ]; - - } - - openPage(page) { - this.app.getComponent('leftMenu').close(); - let nav = this.app.getComponent('nav'); - nav.setRoot(page.component); - } - -} - -@Page({ - templateUrl: 'basic-list.html', -}) -export class PageOne{ - constructor() { - } -} - -@Page({ - templateUrl: 'inset-list.html', -}) -export class PageTwo { - constructor() { - } -} - -@Page({ - templateUrl: 'no-lines-list.html', -}) -export class PageThree { - constructor() { - } -} - -@Page({ - templateUrl: 'list-headers.html', -}) -export class PageFour { - constructor() { - } -} - -@Page({ - templateUrl: 'sliding-items.html', -}) -export class PageFive { - constructor() { - } -} +class ApiDemoApp {} diff --git a/demos/list/inset-list.html b/demos/list/inset-list.html deleted file mode 100644 index d434790226..0000000000 --- a/demos/list/inset-list.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - Inset List - - - - - - - - - - List Header - - - - - Wifi - - - - - Affection - - Very Little - - - - - - Home - - Where the heart is - - - - - - Magic - - - - - Star status - - Super - - - - - - Pizza - - Always - - - - - - Beer - - Yes Plz - - - - - - Wine - - All the time - - - - - - - diff --git a/demos/list/list-headers.html b/demos/list/list-headers.html deleted file mode 100644 index 56ec7f0317..0000000000 --- a/demos/list/list-headers.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - List Headers - - - - - - - - Comedy - Airplane! - Caddyshack - Coming To America - - - - Action - Terminator II - The Empire Strikes Back - Blade Runner - - - - Horror - The Evil Dead - Poldergeist - Aliens - - - diff --git a/demos/list/main.html b/demos/list/main.html new file mode 100644 index 0000000000..bc8002d8bf --- /dev/null +++ b/demos/list/main.html @@ -0,0 +1,82 @@ + + List + + + + + + Settings + + + + + Airplane Mode + + + + + + + + + + + + + + + Silence Phone + + + + Always + + + + Only while phone is locked + + + + + + + Apps Installed + + + + + Ionic View + + + + + Ionic Creator + + + + + Hubstruck + + + + + Barkpark + + + + diff --git a/demos/list/no-lines-list.html b/demos/list/no-lines-list.html deleted file mode 100644 index d8a44bb8c4..0000000000 --- a/demos/list/no-lines-list.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - No-lines List - - - - - - - - - - List Header - - - - - Wifi - - - - - Affection - - Very Little - - - - - - Home - - Where the heart is - - - - - - Magic - - - - - Star status - - Super - - - - - - Pizza - - Always - - - - - - Beer - - Yes Plz - - - - - - Wine - - All the time - - - - - - - diff --git a/demos/list/sliding-items.html b/demos/list/sliding-items.html deleted file mode 100644 index 5a492c1432..0000000000 --- a/demos/list/sliding-items.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - Sliding Items - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demos/local-storage/app.html b/demos/local-storage/app.html deleted file mode 100644 index 5f6bb33d68..0000000000 --- a/demos/local-storage/app.html +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/demos/local-storage/index.ts b/demos/local-storage/index.ts index 958291f4dd..4d590f0443 100644 --- a/demos/local-storage/index.ts +++ b/demos/local-storage/index.ts @@ -3,19 +3,9 @@ import {Storage, LocalStorage} from 'ionic/ionic'; @App({ - templateUrl: 'app.html' -}) -class ApiDemoApp { - - constructor() { - this.rootPage = InitialPage; - } -} - -@Page({ templateUrl: 'main.html' }) -export class InitialPage { +class ApiDemoApp { constructor() { this.local = new Storage(LocalStorage); this.myItem = {}; diff --git a/demos/local-storage/main.html b/demos/local-storage/main.html index f1987a7ba4..594c573cd7 100644 --- a/demos/local-storage/main.html +++ b/demos/local-storage/main.html @@ -1,6 +1,7 @@ - + Local Storage - + + diff --git a/demos/menu/index.ts b/demos/menu/index.ts index ad5869d9c5..651633570d 100644 --- a/demos/menu/index.ts +++ b/demos/menu/index.ts @@ -8,12 +8,10 @@ class Page1 {} @Page({templateUrl: 'page2.html'}) class Page2 {} - @App({ templateUrl: 'main.html' }) -class E2EApp { - +class ApiDemoApp { constructor(app: IonicApp) { this.app = app; this.rootView = Page1; diff --git a/demos/nav-push-pop/app.html b/demos/nav-push-pop/app.html deleted file mode 100644 index 776be9a94a..0000000000 --- a/demos/nav-push-pop/app.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/demos/hide-when/app.html b/demos/navigation/app.html similarity index 100% rename from demos/hide-when/app.html rename to demos/navigation/app.html diff --git a/demos/nav-push-pop/index.ts b/demos/navigation/index.ts similarity index 100% rename from demos/nav-push-pop/index.ts rename to demos/navigation/index.ts diff --git a/demos/nav-push-pop/main.html b/demos/navigation/main.html similarity index 100% rename from demos/nav-push-pop/main.html rename to demos/navigation/main.html diff --git a/demos/nav-push-pop/page-2.html b/demos/navigation/page-2.html similarity index 100% rename from demos/nav-push-pop/page-2.html rename to demos/navigation/page-2.html diff --git a/demos/platform/app.html b/demos/platform/app.html deleted file mode 100644 index 776be9a94a..0000000000 --- a/demos/platform/app.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/demos/platform/index.ts b/demos/platform/index.ts index 5a153ff36b..f4c2ad8d7b 100644 --- a/demos/platform/index.ts +++ b/demos/platform/index.ts @@ -1,23 +1,12 @@ -import {App, Page, IonicApp, Platform} from 'ionic/ionic'; +import {App, Platform} from 'ionic/ionic'; @App({ - templateUrl: 'app.html' -}) -class ApiDemoApp { - - constructor() { - this.rootPage = InitialPage; - } -} - -@Page({ templateUrl: 'main.html' }) -export class InitialPage { +class ApiDemoApp { constructor(platform: Platform) { this.isIos = platform.is('ios'); this.isAndroid = platform.is('android'); this.userAgent = platform.userAgent(); } } - diff --git a/demos/platform/main.html b/demos/platform/main.html index 8bb28195c0..70c8ecaccd 100644 --- a/demos/platform/main.html +++ b/demos/platform/main.html @@ -1,9 +1,9 @@ - + Platform - + -

Change Devices to Update the Platform Values

+

Change devices to see the platform values change.

Name @@ -37,6 +37,11 @@
diff --git a/demos/scroll/map.jpeg b/demos/scroll/map.jpeg new file mode 100644 index 0000000000..c1cd728caf Binary files /dev/null and b/demos/scroll/map.jpeg differ diff --git a/demos/segment/index.ts b/demos/segment/index.ts index 1deaca95e2..7809912a68 100644 --- a/demos/segment/index.ts +++ b/demos/segment/index.ts @@ -3,8 +3,7 @@ import {App, Platform} from 'ionic/ionic'; @App({ templateUrl: 'main.html' }) - -class DemoApp { +class ApiDemoApp { constructor(platform: Platform) { this.platform = platform; this.pet = "puppies"; diff --git a/demos/segment/main.html b/demos/segment/main.html index bf60aa5556..651281a62c 100644 --- a/demos/segment/main.html +++ b/demos/segment/main.html @@ -1,10 +1,7 @@ - + + Segment + - - Segment - - - @@ -112,4 +109,3 @@
- diff --git a/demos/show-when/app.html b/demos/show-when/app.html deleted file mode 100644 index 776be9a94a..0000000000 --- a/demos/show-when/app.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/demos/show-when/index.ts b/demos/show-when/index.ts index a1884eb2c1..405e893db7 100644 --- a/demos/show-when/index.ts +++ b/demos/show-when/index.ts @@ -1,20 +1,6 @@ -import {App, Page, IonicApp} from 'ionic/ionic'; +import {App} from 'ionic/ionic'; @App({ - templateUrl: 'app.html' -}) -class ApiDemoApp { - - constructor() { - this.rootPage = InitialPage; - } -} - -@Page({ templateUrl: 'main.html' }) -export class InitialPage { - constructor() { - } -} - +class ApiDemoApp {} diff --git a/demos/show-when/main.html b/demos/show-when/main.html index 7454bd151d..34de682560 100644 --- a/demos/show-when/main.html +++ b/demos/show-when/main.html @@ -1,30 +1,33 @@ - + ShowWhen - + - -
If the platform is Android, it will show the Android logo. If the platform is iOS, it will show the Apple logo.
+ +
Show Icon Per Platform
+

In this example we're using the showWhen directive to decide whether to show an icon based on the platform.

-
-
- <div showWhen="android"> -
-
-
- <div showWhen="ios"> -
+ + + + + + + +
diff --git a/demos/slides/index.ts b/demos/slides/index.ts index 9cc3af9e62..8807633159 100644 --- a/demos/slides/index.ts +++ b/demos/slides/index.ts @@ -1,46 +1,6 @@ -import {App, IonicApp} from 'ionic/ionic'; -import {Http} from 'angular2/http'; +import {App} from 'ionic/ionic'; @App({ templateUrl: 'main.html', }) -class MyApp { - constructor(private app: IonicApp, http: Http) { - this.http = http; - this.extraOptions = { - loop: true - }; - this.images = []; - - let tags = "amsterdam"; - let FLICKR_API_KEY = '504fd7414f6275eb5b657ddbfba80a2c'; - let baseUrl = 'https://api.flickr.com/services/rest/'; - - this.http.get(baseUrl + '?method=flickr.groups.pools.getPhotos&group_id=1463451@N25&safe_search=1&api_key=' + FLICKR_API_KEY + '&format=json&nojsoncallback=1&tags=' + tags).subscribe( - data => { - let val = data.json(); - this.images = val.photos.photo.slice(0, 20); - setTimeout(() => { - this.slider.update(); - }); - }, - err => console.log(err), - () => console.log('complete') - ); - } - - ngOnInit() { - setTimeout(() => { - this.slider = this.app.getComponent('slider'); - console.log('Got slider', this.slider); - }); - } - - getImageUrl(item) { - return "http://farm"+ item.farm +".static.flickr.com/"+ item.server +"/"+ item.id +"_"+ item.secret + "_z.jpg"; - } - - doRefresh() { - console.log('DOREFRESH') - } -} +class ApiDemoApp {} diff --git a/demos/slides/main.html b/demos/slides/main.html index e9cad308ac..5b0274cc9e 100644 --- a/demos/slides/main.html +++ b/demos/slides/main.html @@ -1,13 +1,5 @@ - - - + + + - diff --git a/demos/slides/slide1.jpeg b/demos/slides/slide1.jpeg new file mode 100644 index 0000000000..1cb03f19a9 Binary files /dev/null and b/demos/slides/slide1.jpeg differ diff --git a/demos/slides/slide2.jpeg b/demos/slides/slide2.jpeg new file mode 100644 index 0000000000..aca6c6ef70 Binary files /dev/null and b/demos/slides/slide2.jpeg differ diff --git a/demos/slides/slide3.jpeg b/demos/slides/slide3.jpeg new file mode 100644 index 0000000000..e4e9bba833 Binary files /dev/null and b/demos/slides/slide3.jpeg differ diff --git a/demos/slides/slide4.jpeg b/demos/slides/slide4.jpeg new file mode 100644 index 0000000000..dfc005a49b Binary files /dev/null and b/demos/slides/slide4.jpeg differ diff --git a/demos/slides/slide5.jpeg b/demos/slides/slide5.jpeg new file mode 100644 index 0000000000..46b91ebdd7 Binary files /dev/null and b/demos/slides/slide5.jpeg differ diff --git a/demos/toggle/app.html b/demos/toggle/app.html deleted file mode 100644 index 776be9a94a..0000000000 --- a/demos/toggle/app.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/demos/toggle/index.ts b/demos/toggle/index.ts index a1884eb2c1..405e893db7 100644 --- a/demos/toggle/index.ts +++ b/demos/toggle/index.ts @@ -1,20 +1,6 @@ -import {App, Page, IonicApp} from 'ionic/ionic'; +import {App} from 'ionic/ionic'; @App({ - templateUrl: 'app.html' -}) -class ApiDemoApp { - - constructor() { - this.rootPage = InitialPage; - } -} - -@Page({ templateUrl: 'main.html' }) -export class InitialPage { - constructor() { - } -} - +class ApiDemoApp {} diff --git a/demos/toggle/main.html b/demos/toggle/main.html index 6585c289de..bff709b020 100644 --- a/demos/toggle/main.html +++ b/demos/toggle/main.html @@ -1,6 +1,6 @@ - + Toggle - + diff --git a/demos/toolbar/app.html b/demos/toolbar/app.html deleted file mode 100644 index 776be9a94a..0000000000 --- a/demos/toolbar/app.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/demos/toolbar/index.ts b/demos/toolbar/index.ts index a1884eb2c1..405e893db7 100644 --- a/demos/toolbar/index.ts +++ b/demos/toolbar/index.ts @@ -1,20 +1,6 @@ -import {App, Page, IonicApp} from 'ionic/ionic'; +import {App} from 'ionic/ionic'; @App({ - templateUrl: 'app.html' -}) -class ApiDemoApp { - - constructor() { - this.rootPage = InitialPage; - } -} - -@Page({ templateUrl: 'main.html' }) -export class InitialPage { - constructor() { - } -} - +class ApiDemoApp {} diff --git a/demos/toolbar/main.html b/demos/toolbar/main.html index 4c659710d6..fca2eb6c25 100644 --- a/demos/toolbar/main.html +++ b/demos/toolbar/main.html @@ -1,9 +1,9 @@ - + Toolbar - + - + This is the title that never ends. It just goes on and on my friend. diff --git a/gulpfile.js b/gulpfile.js index 4b2678e2c5..906576c4a9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -15,7 +15,7 @@ var connect = require('gulp-connect'); var docsConfig = require('./scripts/config.json'); var flagConfig = { - string: ['port', 'version', 'ngVersion', 'animations'], + string: ['port', 'version', 'ngVersion', 'animations', 'strip-debug'], boolean: ['dry-run'], alias: {'p': 'port', 'v': 'version', 'a': 'ngVersion'}, default: { port: 8000 } @@ -154,9 +154,10 @@ function tsCompile(options, cacheName){ gulp.task('transpile.no-typecheck', function(){ var gulpif = require('gulp-if'); var stripDebug = require('gulp-strip-debug'); + var shouldStripDebug = (IS_RELEASE && flags['strip-debug'] !== 'false'); return tsCompile(tscOptionsNoTypeCheck, 'no-typecheck') - .pipe(gulpif(IS_RELEASE, stripDebug())) + .pipe(gulpif(shouldStripDebug, stripDebug())) .pipe(gulp.dest('dist')); }); @@ -165,12 +166,13 @@ gulp.task('typecheck', ['transpile.typecheck']); gulp.task('transpile.typecheck', function(){ var merge = require('merge2'); var stripDebug = require('gulp-strip-debug'); + var shouldStripDebug = (IS_RELEASE && flags['strip-debug'] !== 'false'); var result = tsCompile(tscOptions, 'typecheck'); var js = result.js; var dts = result.dts; - if (IS_RELEASE) { + if (shouldStripDebug) { js = js.pipe(stripDebug()); } diff --git a/ionic/components/alert/alert.ts b/ionic/components/alert/alert.ts index 40e8708d07..51c187476f 100644 --- a/ionic/components/alert/alert.ts +++ b/ionic/components/alert/alert.ts @@ -114,6 +114,7 @@ import {ViewController} from '../nav/view-controller'; * } * ``` * + * @demo /docs/v2/demos/alert/ */ export class Alert extends ViewController { diff --git a/ionic/components/button/button.ts b/ionic/components/button/button.ts index 0d1d9d3f0f..794dc90933 100644 --- a/ionic/components/button/button.ts +++ b/ionic/components/button/button.ts @@ -24,7 +24,7 @@ import {Toolbar} from '../toolbar/toolbar'; * @property [color] - Dynamically set which color attribute this button should use. * @description * Buttons are simple components in Ionic, can consist of text, an icon, or both, and can be enhanced with a wide range of attributes. - * @demo /docs/v2/demos/buttons/ + * @demo /docs/v2/demos/button/ * @see {@link /docs/v2/components#buttons Button Component Docs} */ diff --git a/ionic/components/card/card.scss b/ionic/components/card/card.scss index 3b978ee45b..1f8b7c2163 100644 --- a/ionic/components/card/card.scss +++ b/ionic/components/card/card.scss @@ -7,7 +7,6 @@ ion-card { display: block; overflow: hidden; - transform: translateZ(0); } ion-card img { @@ -25,3 +24,13 @@ ion-card-header { ion-card-content { display: block; } + +ion-card > :first-child { + border-top-left-radius: inherit; + border-top-right-radius: inherit; +} + +ion-card > :last-child { + border-bottom-left-radius: inherit; + border-bottom-right-radius: inherit; +} diff --git a/ionic/components/icon/icon.ts b/ionic/components/icon/icon.ts index 7b4f3ce000..7f821d867d 100644 --- a/ionic/components/icon/icon.ts +++ b/ionic/components/icon/icon.ts @@ -38,6 +38,7 @@ import {Config} from '../../config/config'; * inactive icon on iOS will use an outlined version of the icon same icon. * Material Design icons do not change appearance depending if they're active * or not. The `isActive` property is largely used by the tabbar. + * @demo /docs/v2/demos/icon/ * @see {@link /docs/v2/components#icons Icon Component Docs} * */ diff --git a/ionic/components/input/input-base.ts b/ionic/components/input/input-base.ts index b620436e9a..f509873966 100644 --- a/ionic/components/input/input-base.ts +++ b/ionic/components/input/input-base.ts @@ -353,7 +353,7 @@ export class InputBase { * @private */ clearTextInput() { - console.log("Should clear input"); + console.debug("Should clear input"); } /** diff --git a/ionic/components/list/list.ts b/ionic/components/list/list.ts index b2a4d8724a..1c8390c59b 100644 --- a/ionic/components/list/list.ts +++ b/ionic/components/list/list.ts @@ -66,9 +66,9 @@ export class List extends Ion { */ ngOnInit() { if (isDefined(this.virtual)) { - console.log('Content', this.content); - console.log('Virtual?', this.virtual); - console.log('Items?', this.items.length, 'of \'em'); + console.debug('Content', this.content); + console.debug('Virtual?', this.virtual); + console.debug('Items?', this.items.length, 'of \'em'); this._initVirtualScrolling(); } } diff --git a/ionic/components/list/virtual.ts b/ionic/components/list/virtual.ts index 93d582b86a..c4d829d4bb 100644 --- a/ionic/components/list/virtual.ts +++ b/ionic/components/list/virtual.ts @@ -13,7 +13,7 @@ export class ListVirtualScroll { shownItems = {}; enteringItems = []; leavingItems = []; - + constructor(list: List) { this.list = list; this.content = this.list.content; @@ -44,7 +44,7 @@ export class ListVirtualScroll { this.virtualHeight = this.list.items.length * this.itemHeight; this.itemsPerScreen = this.viewportHeight / this.itemHeight; - console.log('VIRTUAL: resize(viewportHeight:', this.viewportHeight, + console.debug('VIRTUAL: resize(viewportHeight:', this.viewportHeight, 'viewportScrollHeight:', this.viewportScrollHeight, 'virtualHeight:', this.virtualHeight, ', itemsPerScreen:', this.itemsPerScreen, ')'); } @@ -78,7 +78,7 @@ export class ListVirtualScroll { // virtual items we draw for (let i = topIndex, realIndex = 0; i < bottomIndex && i < items.length; i++, realIndex++) { item = items[i]; - console.log('Drawing item', i, item.title); + console.debug('Drawing item', i, item.title); shownItemRef = this.shownItems[i]; @@ -100,12 +100,12 @@ export class ListVirtualScroll { while (this.leavingItems.length) { let itemRef = this.leavingItems.pop(); - console.log('Removing item', itemRef.item, itemRef.realIndex); + console.debug('Removing item', itemRef.item, itemRef.realIndex); this.viewContainer.remove(itemRef.realIndex); } - console.log('VIRTUAL SCROLL: scroll(scrollTop:', st, 'topIndex:', topIndex, 'bottomIndex:', bottomIndex, ')'); - console.log('Container has', this.list.getNativeElement().children.length, 'children'); + console.debug('VIRTUAL SCROLL: scroll(scrollTop:', st, 'topIndex:', topIndex, 'bottomIndex:', bottomIndex, ')'); + console.debug('Container has', this.list.getNativeElement().children.length, 'children'); } cellAtIndex(index) { diff --git a/ionic/components/menu/menu-gestures.ts b/ionic/components/menu/menu-gestures.ts index c82ffb5959..87dc517c70 100644 --- a/ionic/components/menu/menu-gestures.ts +++ b/ionic/components/menu/menu-gestures.ts @@ -3,7 +3,6 @@ import {SlideEdgeGesture} from '../../gestures/slide-edge-gesture'; import {assign} from '../../util/util'; - export class MenuContentGesture extends SlideEdgeGesture { constructor(public menu: Menu, targetEl: Element, options = {}) { @@ -19,8 +18,36 @@ export class MenuContentGesture extends SlideEdgeGesture { } canStart(ev) { - let validAngle = ((-35 <= ev.angle && ev.angle <= 35) || (180 >= ev.angle && ev.angle >= 145) || (-180 <= ev.angle && ev.angle <= -145)); - return this.menu.isOpen && this.menu.isEnabled && validAngle ? true : super.canStart(ev); + let menu = this.menu; + + console.debug('menu canStart, id', menu.id, 'angle', ev.angle, 'distance', ev.distance); + + if (!menu.isEnabled || !menu.isSwipeEnabled) { + console.debug('menu canStart, isEnabled', menu.isEnabled, 'isSwipeEnabled', menu.isSwipeEnabled, 'id', menu.id); + return false; + } + + if (ev.distance > 50) { + // the distance is longer than you'd expect a side menu swipe to be + console.debug('menu canStart, distance too far', ev.distance, 'id', menu.id); + return false; + } + + if (menu.side === 'left') { + // left side menu + if (ev.angle > -40 && ev.angle < 40) { + return super.canStart(ev); + } + + } else if (menu.side === 'right') { + // right side menu + if ((ev.angle > 140 && ev.angle <= 180) || (ev.angle > -140 && ev.angle <= -180)) { + return super.canStart(ev); + } + } + + // didn't pass the test, don't open this menu + return false; } // Set CSS, then wait one frame for it to apply before sliding starts diff --git a/ionic/components/menu/menu.ts b/ionic/components/menu/menu.ts index 406f9eeefe..16836ff46e 100644 --- a/ionic/components/menu/menu.ts +++ b/ionic/components/menu/menu.ts @@ -282,7 +282,7 @@ export class Menu extends Ion { setOpen(shouldOpen) { // _isPrevented is used to prevent unwanted opening/closing after swiping open/close // or swiping open the menu while pressing down on the menuToggle button - if (shouldOpen === this.isOpen || this._isPrevented()) { + if ((shouldOpen && this.isOpen) || this._isPrevented()) { return Promise.resolve(); } diff --git a/ionic/components/menu/test/basic/index.ts b/ionic/components/menu/test/basic/index.ts index a23df1a89c..c9c922e607 100644 --- a/ionic/components/menu/test/basic/index.ts +++ b/ionic/components/menu/test/basic/index.ts @@ -64,8 +64,8 @@ class E2EApp { console.log('onMenuOpening', ev); } - isHidden() { + isChangeDetecting() { console.log('Change detection', ++this.changeDetectionCount); - return false; + return true; } } diff --git a/ionic/components/menu/test/basic/main.html b/ionic/components/menu/test/basic/main.html index 81ac00582e..ee03015948 100644 --- a/ionic/components/menu/test/basic/main.html +++ b/ionic/components/menu/test/basic/main.html @@ -1,4 +1,4 @@ - + Left Menu @@ -12,7 +12,51 @@ {{p.title}} - + + + + + + + + + + + + + + + + + + + + + + @@ -40,9 +84,60 @@ Close Menu + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/ionic/components/menu/test/basic/page1.html b/ionic/components/menu/test/basic/page1.html index 9a75a6c92e..0d1b51c54b 100644 --- a/ionic/components/menu/test/basic/page1.html +++ b/ionic/components/menu/test/basic/page1.html @@ -51,4 +51,6 @@

+ +
diff --git a/ionic/components/nav/nav-push.ts b/ionic/components/nav/nav-push.ts index 527e14046c..8a18e821e3 100644 --- a/ionic/components/nav/nav-push.ts +++ b/ionic/components/nav/nav-push.ts @@ -38,7 +38,7 @@ import {NavRegistry} from './nav-registry'; * ```html * * ``` - * @demo /docs/v2/demos/nav-push-pop/ + * @demo /docs/v2/demos/navigation/ * @see {@link /docs/v2/components#navigation Navigation Component Docs} * @see {@link ../NavPop NavPop API Docs} */ @@ -52,9 +52,9 @@ import {NavRegistry} from './nav-registry'; export class NavPush { @Input() navPush; @Input() navParams; - + constructor( - @Optional() private _nav: NavController, + @Optional() private _nav: NavController, private registry: NavRegistry ) { if (!_nav) { @@ -74,7 +74,7 @@ export class NavPush { } destination = this.navPush[0]; params = this.navPush[1] || this.navParams; - + } else { destination = this.navPush; params = this.navParams; @@ -103,7 +103,7 @@ export class NavPush { * This will go back one page in the navigation stack * * Similar to {@link /docs/v2/api/components/nav/NavPush/ `NavPush` } - * @demo /docs/v2/demos/nav-push-pop/ + * @demo /docs/v2/demos/navigation/ * @see {@link /docs/v2/components#navigation Navigation Component Docs} * @see {@link ../NavPush NavPush API Docs} */ diff --git a/ionic/components/nav/nav.ts b/ionic/components/nav/nav.ts index 8f8f11828a..0d9f3727e8 100644 --- a/ionic/components/nav/nav.ts +++ b/ionic/components/nav/nav.ts @@ -98,6 +98,7 @@ import {ViewController} from './view-controller'; * * * + * @demo /docs/v2/demos/navigation/ * @see {@link /docs/v2/components#navigation Navigation Component Docs} */ @Component({ diff --git a/ionic/components/scroll/pull-to-refresh.ts b/ionic/components/scroll/pull-to-refresh.ts index 469ee8e0cb..4f16022de1 100644 --- a/ionic/components/scroll/pull-to-refresh.ts +++ b/ionic/components/scroll/pull-to-refresh.ts @@ -31,20 +31,20 @@ import {raf, ready, CSS} from '../../util/dom'; * export class MyClass { * constructor(){} * doRefresh(refresher) { - * console.log('Refreshing!', refresher); + * console.debug('Refreshing!', refresher); * * setTimeout(() => { - * console.log('Pull to refresh complete!', refresher); + * console.debug('Pull to refresh complete!', refresher); * refresher.complete(); * }) * } * * doStarting() { - * console.log('Pull started!'); + * console.debug('Pull started!'); * } * * doPulling(amt) { - * console.log('You have pulled', amt); + * console.debug('You have pulled', amt); * } * } * ``` @@ -81,54 +81,154 @@ import {raf, ready, CSS} from '../../util/dom'; directives: [NgIf, NgClass, Icon] }) export class Refresher { - private ele: HTMLElement; + private _ele: HTMLElement; private _touchMoveListener; private _touchEndListener; private _handleScrollListener; + + /** + * @private + */ isActive: boolean; + + /** + * @private + */ isDragging: boolean = false; + + /** + * @private + */ isOverscrolling: boolean = false; + + /** + * @private + */ dragOffset: number = 0; + + /** + * @private + */ lastOverscroll: number = 0; + + /** + * @private + */ ptrThreshold: number = 0; + + /** + * @private + */ activated: boolean = false; + + /** + * @private + */ scrollTime: number = 500; + + /** + * @private + */ canOverscroll: boolean = true; + + /** + * @private + */ startY; + + /** + * @private + */ deltaY; + + /** + * @private + */ scrollHost; + + /** + * @private + */ scrollChild; + + /** + * @private + */ showIcon: boolean; + + /** + * @private + */ showSpinner: boolean; + + /** + * @private + */ isRefreshing: boolean; + + /** + * @private + */ isRefreshingTail: boolean; + + /** + * @private + */ @Input() pullingIcon: string; + + /** + * @private + */ @Input() pullingText: string; + + /** + * @private + */ @Input() refreshingIcon: string; + + /** + * @private + */ @Input() refreshingText: string; + + /** + * @private + */ @Input() spinner: string; + + /** + * @private + */ @Output() pulling: EventEmitter = new EventEmitter(); + + /** + * @private + */ @Output() refresh: EventEmitter = new EventEmitter(); + + /** + * @private + */ @Output() starting: EventEmitter = new EventEmitter(); constructor( - @Host() private content: Content, - element: ElementRef + @Host() private _content: Content, + _element: ElementRef ) { - this.ele = element.nativeElement; - this.ele.classList.add('content'); + this._ele = _element.nativeElement; + this._ele.classList.add('content'); } /** * @private */ ngOnInit() { - let sp = this.content.getNativeElement(); - let sc = this.content.scrollElement; + let sp = this._content.getNativeElement(); + let sc = this._content.scrollElement; this.startY = null; this.deltaY = null; @@ -156,7 +256,7 @@ export class Refresher { * @private */ ngOnDestroy() { - let sc = this.content.scrollElement; + let sc = this._content.scrollElement; sc.removeEventListener('touchmove', this._touchMoveListener); sc.removeEventListener('touchend', this._touchEndListener); sc.removeEventListener('scroll', this._handleScrollListener); @@ -245,7 +345,7 @@ export class Refresher { */ show() { // showCallback - this.ele.classList.remove('invisible'); + this._ele.classList.remove('invisible'); } /** @@ -253,7 +353,7 @@ export class Refresher { */ hide() { // showCallback - this.ele.classList.add('invisible'); + this._ele.classList.add('invisible'); } /** @@ -261,7 +361,7 @@ export class Refresher { */ tail() { // tailCallback - this.ele.classList.add('refreshing-tail'); + this._ele.classList.add('refreshing-tail'); } /** @@ -341,7 +441,7 @@ export class Refresher { * @param {Event} e TODO */ _handleTouchMove(e) { - //console.log('TOUCHMOVE', e); + //console.debug('TOUCHMOVE', e); // if multitouch or regular scroll event, get out immediately if (!this.canOverscroll || e.touches.length > 1) { @@ -413,7 +513,7 @@ export class Refresher { * @param {Event} e TODO */ _handleTouchEnd(e) { - console.log('TOUCHEND', e); + console.debug('TOUCHEND', e); // if this wasn't an overscroll, get out immediately if (!this.canOverscroll && !this.isDragging) { return; @@ -448,6 +548,6 @@ export class Refresher { * @param {Event} e TODO */ _handleScroll(e) { - console.log('SCROLL', e.target.scrollTop); + console.debug('SCROLL', e.target.scrollTop); } } diff --git a/ionic/components/scroll/scroll.ts b/ionic/components/scroll/scroll.ts index 05e6656e99..9f22e9b6c5 100644 --- a/ionic/components/scroll/scroll.ts +++ b/ionic/components/scroll/scroll.ts @@ -45,8 +45,17 @@ import * as util from '../../util'; '' }) export class Scroll extends Ion { + /** + * @private + */ private maxScale: number = 3; + /** + * @private + */ private zoomDuration: number = 250; + /** + * @private + */ private scrollElement: HTMLElement; constructor(elementRef: ElementRef) { diff --git a/ionic/components/searchbar/searchbar.ts b/ionic/components/searchbar/searchbar.ts index 8d55f724b1..6db1911909 100644 --- a/ionic/components/searchbar/searchbar.ts +++ b/ionic/components/searchbar/searchbar.ts @@ -72,6 +72,9 @@ export class SearchbarInput { directives: [FORM_DIRECTIVES, NgIf, NgClass, Icon, Button, SearchbarInput] }) export class Searchbar extends Ion { + /** + * @private + */ @ViewChild(SearchbarInput) searchbarInput; /** @@ -112,13 +115,40 @@ export class Searchbar extends Ion { */ @Output() clear: EventEmitter = new EventEmitter(); + /** + * @private + */ value: string = ''; + + /** + * @private + */ blurInput: boolean = true; + + /** + * @private + */ inputElement: any; + + /** + * @private + */ searchIconElement: any; + + /** + * @private + */ mode: string; + + /** + * @private + */ @HostBinding('class.searchbar-focused') isFocused; + + /** + * @private + */ @HostBinding('class.searchbar-left-aligned') shouldLeftAlign; constructor( diff --git a/ionic/components/segment/segment.ts b/ionic/components/segment/segment.ts index 8f503c856a..eb5d297dbc 100644 --- a/ionic/components/segment/segment.ts +++ b/ionic/components/segment/segment.ts @@ -8,7 +8,6 @@ import {isDefined} from '../../util/util'; * @name SegmentButton * @description * The child buttons of the `ion-segment` component. Each `ion-segment-button` must have a value. - * @property {string} [value] - the value of the segment-button. Required. * @usage * ```html * @@ -39,7 +38,9 @@ import {isDefined} from '../../util/util'; * * ``` * + * @property {string} [value] - the value of the segment-button. Required. * @property {Any} [click] - expression to evaluate when a segment button has been clicked + * @property {Any} (select) - expression to evaluate when a segment selection has been changed * * @demo /docs/v2/demos/segment/ * @see {@link /docs/v2/components#segment Segment Component Docs} @@ -54,7 +55,15 @@ import {isDefined} from '../../util/util'; } }) export class SegmentButton { + + /** + * @private + */ @Input() value: string; + + /** + * @private + */ @Output() select: EventEmitter = new EventEmitter(); constructor(private _renderer: Renderer, private _elementRef: ElementRef) {} @@ -137,10 +146,22 @@ export class SegmentButton { selector: 'ion-segment' }) export class Segment { + + /** + * @private + */ value: string; + + /** + * @private + */ @Output() change: EventEmitter = new EventEmitter(); + + /** + * @private + */ @ContentChildren(SegmentButton) _buttons: QueryList; constructor(@Optional() ngControl: NgControl) { diff --git a/ionic/components/select/select.ts b/ionic/components/select/select.ts index 2d4efb199c..272147659b 100644 --- a/ionic/components/select/select.ts +++ b/ionic/components/select/select.ts @@ -92,7 +92,13 @@ import {Option} from '../option/option'; * subTitle: 'Select your toppings' * }; * ``` - * + * @property [cancelText] - The text of the cancel button. Defatuls to 'cancel' + * @property [okText] - The text of the ok button. Defatuls to 'OK' + * @property [alertOptions] - Any addition options that an alert can take. Title, Subtitle, etc. + * @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 + */ @Component({ selector: 'ion-select', @@ -125,11 +131,29 @@ export class Select { */ id: string; + /** + * @private + */ @Input() cancelText: string = 'Cancel'; + + /** + * @private + */ @Input() okText: string = 'OK'; + + /** + * @private + */ @Input() alertOptions: any = {}; + + /** + * @private + */ @Input() checked: any = false; + /** + * @private + */ @Output() change: EventEmitter = new EventEmitter(); constructor( @@ -215,6 +239,10 @@ export class Select { this._nav.present(alert, alertOptions); } + + /** + * @private + */ @Input() get multiple() { return this._multi; @@ -224,6 +252,10 @@ export class Select { this._multi = isTrueProperty(val); } + + /** + * @private + */ @Input() get value(): any { return (this._multi ? this._values : this._values.join()); @@ -235,10 +267,17 @@ export class Select { this.updateOptions(); } + + /** + * @private + */ get text() { return (this._multi ? this._texts : this._texts.join()); } + /** + * @private + */ @ContentChildren(Option) private set options(val: QueryList