From 8c7bfc6da2f0ca9953650851c74b4bdeecd01cac Mon Sep 17 00:00:00 2001
From: mhartington
Date: Tue, 2 Feb 2016 12:41:05 -0500
Subject: [PATCH 01/38] docs(pullToRefresh): update docs
---
ionic/components/scroll/pull-to-refresh.ts | 122 +++++++++++++++++++--
1 file changed, 111 insertions(+), 11 deletions(-)
diff --git a/ionic/components/scroll/pull-to-refresh.ts b/ionic/components/scroll/pull-to-refresh.ts
index 469ee8e0cb..a429d404cd 100644
--- a/ionic/components/scroll/pull-to-refresh.ts
+++ b/ionic/components/scroll/pull-to-refresh.ts
@@ -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');
}
/**
From 9ceb7f2fcc85b26c6dd3710145973e5ecd47c302 Mon Sep 17 00:00:00 2001
From: mhartington
Date: Tue, 2 Feb 2016 13:13:41 -0500
Subject: [PATCH 02/38] docs(scroll): update docs
---
ionic/components/scroll/scroll.ts | 9 +++++++++
1 file changed, 9 insertions(+)
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) {
From 7f068a25ece5f0f56969c4f2920279232872de62 Mon Sep 17 00:00:00 2001
From: mhartington
Date: Tue, 2 Feb 2016 13:15:09 -0500
Subject: [PATCH 03/38] docs(searchbar): update docs
---
ionic/components/searchbar/searchbar.ts | 30 +++++++++++++++++++++++++
1 file changed, 30 insertions(+)
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(
From ed027fa951594f4e5c1d6b531c9def3302d4f92c Mon Sep 17 00:00:00 2001
From: mhartington
Date: Tue, 2 Feb 2016 13:36:53 -0500
Subject: [PATCH 04/38] docs(segment): update docs
---
ionic/components/segment/segment.ts | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
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) {
From ba659a760674ed7e76c7a3d52c929df4e54c6790 Mon Sep 17 00:00:00 2001
From: Perry Govier
Date: Tue, 2 Feb 2016 12:37:30 -0600
Subject: [PATCH 05/38] docs(demos): document how to deploy API demos
---
scripts/README.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/README.md b/scripts/README.md
index 1a629243c2..0734dd2cfa 100644
--- a/scripts/README.md
+++ b/scripts/README.md
@@ -68,4 +68,6 @@
See [ionic-preview-app](https://github.com/driftyco/ionic-preview-app#updating-ionic-site)
### Releasing API Demos
-TODO
+Ionic API demos are automatically compiled and deployed to the [ionic staging site](http://ionic-site-staging.herokuapp.com/) on every commit. No action is necessary.
+
+If you'd like to manually update the demos, clone the [`ionic-site`](https://github.com/driftyco/ionic-site) repo as a sibling of `ionic`. From `ionic` run gulp docs, and it'll compile and copy the demos to the `ionic-site` repo, ready for testing or committing.
From ab01be765d0e3550dba84458e72e5ec76496150f Mon Sep 17 00:00:00 2001
From: Perry Govier
Date: Tue, 2 Feb 2016 12:46:04 -0600
Subject: [PATCH 06/38] docs(demos): copy explanation of how to update
component demos on ionic-site
---
scripts/README.md | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/scripts/README.md b/scripts/README.md
index 0734dd2cfa..336b685b23 100644
--- a/scripts/README.md
+++ b/scripts/README.md
@@ -65,7 +65,14 @@
6. Sit back and have a beer :beer: (or wine :wine_glass:)
### Releasing Component Demos
-See [ionic-preview-app](https://github.com/driftyco/ionic-preview-app#updating-ionic-site)
+
+(Copied from [ionic-preview-app](https://github.com/driftyco/ionic-preview-app#updating-ionic-site), check there for updates)
+
+- Set [production mode](https://github.com/driftyco/ionic-preview-app/blob/master/app/app.ts#L11) to true
+- Rebuild app
+- Copy the contents of this entire repo to `ionic-site/dist/preview-app/` (`cp -R * ../path/to/ionic-site/dist/preview-app/`)
+
+
### Releasing API Demos
Ionic API demos are automatically compiled and deployed to the [ionic staging site](http://ionic-site-staging.herokuapp.com/) on every commit. No action is necessary.
From 0fb297fe344c3cb51de187f264ae8a00e8e20fd5 Mon Sep 17 00:00:00 2001
From: mhartington
Date: Tue, 2 Feb 2016 14:16:16 -0500
Subject: [PATCH 07/38] docs(select): update docs
---
ionic/components/select/select.ts | 52 ++++++++++++++++++++++++++++++-
1 file changed, 51 insertions(+), 1 deletion(-)
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
+
+
From 8eade6880940d9405a0d3457b74e507eb82546f6 Mon Sep 17 00:00:00 2001
From: Brandy Carney
Date: Tue, 2 Feb 2016 22:00:24 -0500
Subject: [PATCH 16/38] docs(demos): add Alert API demos
references #5311
---
demos/alert/app.html | 1 +
demos/alert/index.ts | 220 ++++++++++++++++++++++++++++++++++++++++++
demos/alert/main.html | 12 +++
3 files changed, 233 insertions(+)
create mode 100644 demos/alert/app.html
create mode 100644 demos/alert/index.ts
create mode 100644 demos/alert/main.html
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
+
+
+
+
+
+
+
+
+
+
From 6e0a0a7ec8d39c749ef3f2ff58c686f3642df03d Mon Sep 17 00:00:00 2001
From: Brandy Carney
Date: Tue, 2 Feb 2016 22:00:48 -0500
Subject: [PATCH 17/38] docs(demos): clean up some of the demo markup
references #5311
---
demos/buttons/main.html | 13 ++++++-------
demos/config/main.html | 2 +-
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/demos/buttons/main.html b/demos/buttons/main.html
index 6efc84cddc..b37d851bf9 100644
--- a/demos/buttons/main.html
+++ b/demos/buttons/main.html
@@ -3,29 +3,28 @@
Buttons
-
-
+
Colors
-
+
-
+
-
+
-
+
-
+
Shapes
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 @@
})
-
From d937588775bac542792854bee5fc38cfe4f1aedc Mon Sep 17 00:00:00 2001
From: Brandy Carney
Date: Tue, 2 Feb 2016 22:01:04 -0500
Subject: [PATCH 18/38] docs(demos): refactor hide/show-when demos
references #5311
---
demos/hide-when/main.html | 37 ++++++++++++++++++++-----------------
demos/show-when/main.html | 37 ++++++++++++++++++++-----------------
2 files changed, 40 insertions(+), 34 deletions(-)
diff --git a/demos/hide-when/main.html b/demos/hide-when/main.html
index 12e4d4c157..b8e0cdf306 100644
--- a/demos/hide-when/main.html
+++ b/demos/hide-when/main.html
@@ -2,29 +2,32 @@
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/show-when/main.html b/demos/show-when/main.html
index 7454bd151d..9a9cb35887 100644
--- a/demos/show-when/main.html
+++ b/demos/show-when/main.html
@@ -2,29 +2,32 @@
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">
-
+
+
+
+
+
+
+
+
From 7e06e6c5639b9ee659b6a2e8278132fc8b4bc66b Mon Sep 17 00:00:00 2001
From: mhartington
Date: Wed, 3 Feb 2016 11:46:46 -0500
Subject: [PATCH 19/38] docs(slides,page): update docs
---
ionic/components/slides/slides.ts | 22 +++++++++++-----------
ionic/decorators/page.ts | 3 ++-
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/ionic/components/slides/slides.ts b/ionic/components/slides/slides.ts
index c1b09b24ae..9e9ece4516 100644
--- a/ionic/components/slides/slides.ts
+++ b/ionic/components/slides/slides.ts
@@ -18,17 +18,6 @@ import {Scroll} from '../scroll/scroll';
* @description
* Slides is a slide box implementation based on Swiper.js
*
- * Swiper.js:
- * The most modern mobile touch slider and framework with hardware accelerated transitions
- *
- * http://www.idangero.us/swiper/
- *
- * Copyright 2015, Vladimir Kharlampidi
- * The iDangero.us
- * http://www.idangero.us/
- *
- * Licensed under MIT
- *
* @usage
* ```ts
* @Page({
@@ -71,6 +60,17 @@ import {Scroll} from '../scroll/scroll';
* @property {Any} (change) - expression to evaluate when a slide has been changed
* @demo /docs/v2/demos/slides/
* @see {@link /docs/v2/components#slides Slides Component Docs}
+ *
+ * Swiper.js:
+ * The most modern mobile touch slider and framework with hardware accelerated transitions
+ *
+ * http://www.idangero.us/swiper/
+ *
+ * Copyright 2015, Vladimir Kharlampidi
+ * The iDangero.us
+ * http://www.idangero.us/
+ *
+ * Licensed under MIT
*/
@Component({
selector: 'ion-slides',
diff --git a/ionic/decorators/page.ts b/ionic/decorators/page.ts
index 2e05399472..e68bcf38c7 100644
--- a/ionic/decorators/page.ts
+++ b/ionic/decorators/page.ts
@@ -6,7 +6,6 @@ const _reflect: any=Reflect;
/**
* @name Page
* @description
- *For more information on how pages are created, see the [NavController API reference](../../components/nav/NavController/#creating_pages)
*
* The Page decorator indicates that the decorated class is an Ionic
* navigation component, meaning it can be navigated to using a NavController.
@@ -69,6 +68,8 @@ const _reflect: any=Reflect;
* Pages have their content automatically wrapped in ``, so although
* you may see these tags if you inspect your markup, you don't need to include
* them in your templates.
+ *
+ * For more information on how pages are created, see the [NavController API reference](../../components/nav/NavController/#creating_pages)
*/
export function Page(config: any={}) {
return function(cls) {
From 234ab90fd0eff70bde8e45720761557cca89ed25 Mon Sep 17 00:00:00 2001
From: Brandy Carney
Date: Wed, 3 Feb 2016 12:10:26 -0500
Subject: [PATCH 20/38] docs(demos): prettify label demo
---
demos/label/ionic.svg | 19 ++++++++++++
demos/label/main.html | 70 ++++++++++++++++++++++++++++++++-----------
2 files changed, 72 insertions(+), 17 deletions(-)
create mode 100644 demos/label/ionic.svg
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..6bf2cc2b70 100644
--- a/demos/label/main.html
+++ b/demos/label/main.html
@@ -2,31 +2,67 @@
Label
-
-
-
-
+
+
+
+
+
+
+ Ionic
-
-
+
- Fixed Label
-
+ Mobile
+
+
+
-
-
- Floating Label
-
+ Email
+
-
-
- Stacked Label
-
+ Birthday
+
-
+
+
+ Address
+
+
+
+
+
+ Notes
+
+
+
+
+ Send Message
+
+
+ Share Contact
+
+
+ Add to Favorites
+
+
+
+
From d38e3fd5f3caafec4181c5c98aca3c8d8d23dd62 Mon Sep 17 00:00:00 2001
From: Brandy Carney
Date: Wed, 3 Feb 2016 12:48:13 -0500
Subject: [PATCH 21/38] docs(demos): prettify list demo and remove
unnecessary/unused files
references #5311
---
demos/list/app.html | 24 ----------
demos/list/basic-list.html | 85 -----------------------------------
demos/list/index.ts | 68 ++--------------------------
demos/list/inset-list.html | 83 ----------------------------------
demos/list/list-headers.html | 37 ---------------
demos/list/main.html | 73 ++++++++++++++++++++++++++++++
demos/list/no-lines-list.html | 83 ----------------------------------
demos/list/sliding-items.html | 59 ------------------------
8 files changed, 76 insertions(+), 436 deletions(-)
delete mode 100644 demos/list/app.html
delete mode 100644 demos/list/basic-list.html
delete mode 100644 demos/list/inset-list.html
delete mode 100644 demos/list/list-headers.html
create mode 100644 demos/list/main.html
delete mode 100644 demos/list/no-lines-list.html
delete mode 100644 demos/list/sliding-items.html
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 @@
-
-
-
\ 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..8c0c9c23c6 100644
--- a/demos/list/index.ts
+++ b/demos/list/index.ts
@@ -1,71 +1,9 @@
-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() {
- }
+ constructor() { }
}
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..2511da1f61
--- /dev/null
+++ b/demos/list/main.html
@@ -0,0 +1,73 @@
+
+
+ List
+
+
+
+
+
+ Settings
+
+
+
+
+ Airplane Mode
+
+
+
+
+
+ Wi-Fi
+ The Interwebz
+
+
+
+
+ Bluetooth
+ Off
+
+
+
+
+ Cellular
+
+
+
+
+ Personal Hotspot
+ Off
+
+
+
+
+
+ Silence Phone
+
+
+
+ Always
+
+
+
+ Only while phone is locked
+
+
+
+
+
+
+ Apps Installed
+
+
+
+
+ Ionic View
+ Uninstall
+
+
+
+ Ionic Creator
+ Uninstall
+
+
+
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
-
-
-
-
-
-
-
-
-
- Max Lynch
-
- Hey do you want to go to the game tonight?
-
-
-
- Archive
- Delete
-
-
-
-
-
- Adam Bradley
-
- I think I figured out how to get more Mountain Dew
-
-
-
- Archive
- Delete
-
-
-
-
-
- Ben Sperry
-
- I like paper
-
-
-
- Archive
- Delete
-
-
-
-
-
-
-
From dd30b9be77e528db56f197f0ec60eee30dcc5714 Mon Sep 17 00:00:00 2001
From: Brandy Carney
Date: Wed, 3 Feb 2016 12:49:29 -0500
Subject: [PATCH 22/38] docs(demos): add hubstruck to list demo
references #5311
---
demos/list/main.html | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/demos/list/main.html b/demos/list/main.html
index 2511da1f61..6bfd4e2a16 100644
--- a/demos/list/main.html
+++ b/demos/list/main.html
@@ -69,5 +69,10 @@
Ionic Creator
Uninstall
+
+
+ Hubstruck
+ Uninstall
+
From 1abe9918eab3817f176d6d4bc8fb54814ded560c Mon Sep 17 00:00:00 2001
From: Adam Bradley
Date: Wed, 3 Feb 2016 11:55:13 -0600
Subject: [PATCH 23/38] chore(snapshot): ignore files to upload
---
scripts/e2e/e2e-publish.js | 10 +++++++---
scripts/snapshot/snapshot.config.js | 4 ++--
scripts/snapshot/snapshot.task.js | 2 +-
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/scripts/e2e/e2e-publish.js b/scripts/e2e/e2e-publish.js
index ae1e2451d6..b2148d8a5f 100644
--- a/scripts/e2e/e2e-publish.js
+++ b/scripts/e2e/e2e-publish.js
@@ -7,13 +7,17 @@ module.exports = function(options) {
var inputDir = path.join(__dirname, '../../dist');
var uploadQueue = [];
+ var ignoreFiles = /(\/test\/|\/ts\/|\/q\/|\/ionic-site\/|\/docs\/|\/examples\/|\/inquirer\/|\/lodash\/|\/tooling\/|\/colors\/|\/bin\/|\.ts$|\.bin|\.map$|\.md$|\.git|\.scss$|\.yml$|\.yaml$|\.dart$|\.txt|\.npm|bower|DS_Store|LICENSE)/i;
+
function uploadFiles(dir, urlPath) {
fs.readdir(dir, function(err, list) {
list.forEach(function(file) {
var url = urlPath + '/' + file
- if (url.indexOf('/test/') > -1 || url.indexOf('/ionic-site/') > -1 || url.indexOf('/docs/') > -1) return;
+ if (ignoreFiles.test(url)) {
+ return;
+ }
fs.stat(dir + '/' + file, function(err, stat) {
if (stat && stat.isDirectory()) {
@@ -75,7 +79,7 @@ module.exports = function(options) {
function(err, httpResponse, body) {
if (err) {
uploadData.status = 'failed';
- console.error('Get upload failed:', err);
+ console.error('Get upload failed:', uploadData.url_path, err);
} else {
if (httpResponse.statusCode == 200) {
@@ -101,7 +105,7 @@ module.exports = function(options) {
setTimeout(postNextUpload, 100);
if (err) {
- console.error('Upload failed:', err);
+ console.error('Upload failed:', uploadUrl, err);
uploadData.status = 'failed';
} else {
diff --git a/scripts/snapshot/snapshot.config.js b/scripts/snapshot/snapshot.config.js
index 29858c57cc..5a884e817d 100644
--- a/scripts/snapshot/snapshot.config.js
+++ b/scripts/snapshot/snapshot.config.js
@@ -9,9 +9,9 @@ exports.config = {
//domain: 'localhost:8080',
specs: 'dist/e2e/**/*e2e.js',
- // specs: 'dist/e2e/input/**/*e2e.js',
+ // specs: 'dist/e2e/button/**/*e2e.js',
- sleepBetweenSpecs: 350,
+ sleepBetweenSpecs: 380,
platformDefauls: {
browser: 'chrome',
diff --git a/scripts/snapshot/snapshot.task.js b/scripts/snapshot/snapshot.task.js
index fcf0cf750c..3d79a5908b 100644
--- a/scripts/snapshot/snapshot.task.js
+++ b/scripts/snapshot/snapshot.task.js
@@ -90,7 +90,7 @@ module.exports = function(gulp, argv, buildConfig) {
var chars = 'abcdefghijklmnopqrstuvwxyz';
var id = chars.charAt(Math.floor(Math.random() * chars.length));
chars += '0123456789';
- while (id.length < 4) {
+ while (id.length < 3) {
id += chars.charAt(Math.floor(Math.random() * chars.length));
}
return id;
From eccac3aa57c9a4f481e1348e014e465649ec7829 Mon Sep 17 00:00:00 2001
From: perry
Date: Wed, 3 Feb 2016 12:00:09 -0600
Subject: [PATCH 24/38] chore(docs): remove description header from API docs
Fixes driftyco/ionic-site#390
---
scripts/docs/templates/common.template.html | 3 ---
1 file changed, 3 deletions(-)
diff --git a/scripts/docs/templates/common.template.html b/scripts/docs/templates/common.template.html
index 3406101e17..98f1656914 100644
--- a/scripts/docs/templates/common.template.html
+++ b/scripts/docs/templates/common.template.html
@@ -118,9 +118,6 @@ Improve this doc
<@ endblock @>
-
-
-Description
<@ block description @>
<$ doc.description | marked $>
<@ endblock @>
From 7bd5992320518d2ac1cadbedb38a0801fc401645 Mon Sep 17 00:00:00 2001
From: Brandy Carney
Date: Wed, 3 Feb 2016 13:16:10 -0500
Subject: [PATCH 25/38] docs(demos): add barkpark as an installed app
references #5311
---
demos/list/main.html | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/demos/list/main.html b/demos/list/main.html
index 6bfd4e2a16..995d4864f8 100644
--- a/demos/list/main.html
+++ b/demos/list/main.html
@@ -74,5 +74,10 @@
Hubstruck
Uninstall
+
+
+ Barkpark
+ Uninstall
+
From f5a20d3dbb21acaa78b555ae15f2f2a171e2e539 Mon Sep 17 00:00:00 2001
From: mhartington
Date: Wed, 3 Feb 2016 13:51:38 -0500
Subject: [PATCH 26/38] docs(config): add mode change example Closes #5312
---
ionic/config/config.ts | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/ionic/config/config.ts b/ionic/config/config.ts
index d8e528543b..09ce30a5cf 100644
--- a/ionic/config/config.ts
+++ b/ionic/config/config.ts
@@ -29,6 +29,17 @@ import {isObject, isDefined, isFunction, isArray} from '../util/util';
* })
* ```
*
+ * Or change the whole mode
+ *
+ * ```ts
+ * @App({
+ * template: ``
+ * config: {
+ * mode: md
+ * }
+ * })
+ * ```
+ *
* Config can be overwritting at multiple levels, allowing deeper configuration. Taking the example from earlier, we can override any setting we want based on a platform.
* ```ts
* @App({
From 59da895ea06dcfece29fa2e8e1b74ccfa07cbec2 Mon Sep 17 00:00:00 2001
From: Brandy Carney
Date: Wed, 3 Feb 2016 14:26:21 -0500
Subject: [PATCH 27/38] docs(demos): fix demos to have same class name and
remove files that aren't needed anymore
references #5311
---
demos/blur/index.ts | 6 +-
demos/{buttons => button}/index.ts | 3 +-
demos/button/main.html | 64 ++++++++++++++++++
demos/buttons/main.html | 103 -----------------------------
demos/checkbox/app.html | 2 -
demos/checkbox/index.ts | 18 +----
demos/config/index.html | 13 ----
demos/hide-when/app.html | 1 -
demos/hide-when/index.ts | 18 +----
demos/label/app.html | 1 -
demos/label/index.ts | 18 +----
demos/list/index.ts | 5 +-
demos/local-storage/app.html | 2 -
demos/local-storage/index.ts | 12 +---
demos/menu/index.ts | 4 +-
demos/platform/app.html | 1 -
demos/platform/index.ts | 15 +----
demos/radio/index.ts | 6 +-
demos/refresher/app.html | 2 -
demos/refresher/index.ts | 16 +----
demos/scroll/index.ts | 6 +-
demos/segment/index.ts | 3 +-
demos/show-when/index.ts | 18 +----
demos/slides/index.ts | 2 +-
demos/toggle/app.html | 1 -
demos/toggle/index.ts | 18 +----
demos/toolbar/app.html | 1 -
demos/toolbar/index.ts | 18 +----
ionic/components/alert/alert.ts | 1 +
ionic/components/button/button.ts | 2 +-
30 files changed, 90 insertions(+), 290 deletions(-)
rename demos/{buttons => button}/index.ts (78%)
create mode 100644 demos/button/main.html
delete mode 100644 demos/buttons/main.html
delete mode 100644 demos/checkbox/app.html
delete mode 100644 demos/hide-when/app.html
delete mode 100644 demos/label/app.html
delete mode 100644 demos/local-storage/app.html
delete mode 100644 demos/platform/app.html
delete mode 100644 demos/refresher/app.html
delete mode 100644 demos/toggle/app.html
delete mode 100644 demos/toolbar/app.html
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
+
+ Default
+
+ Secondary
+
+ Danger
+
+ Light
+
+ Dark
+
+ Shapes
+
+ Full Button
+
+ Block Button
+
+ Round Button
+
+ FAB
+
+ Outlines
+
+ Outline + Full
+
+ Outline + Block
+
+ Outline + Round
+
+ FAB
+
+ Icons
+
+
+
+ Left Icon
+
+
+
+ Right Icon
+
+
+
+
+
+
+
+ Sizes
+
+ Large
+
+ Default
+
+ Small
+
+
diff --git a/demos/buttons/main.html b/demos/buttons/main.html
deleted file mode 100644
index b37d851bf9..0000000000
--- a/demos/buttons/main.html
+++ /dev/null
@@ -1,103 +0,0 @@
-
-
- Buttons
-
-
-
-
- Colors
-
-
- Default
-
-
-
- Secondary
-
-
-
- Danger
-
-
-
- Light
-
-
-
- Dark
-
-
- Shapes
-
-
- Full Button
-
-
-
- Block Button
-
-
-
- Round Button
-
-
-
- FAB
-
-
- Outlines
-
-
- Outline + Full
-
-
-
- Outline + Block
-
-
-
- Outline + Round
-
-
-
- FAB
-
-
- Icons
-
-
-
-
- Left Icon
-
-
-
-
-
- Right Icon
-
-
-
-
-
-
-
-
-
-
-
- Sizes
-
-
- Large
-
-
-
- Default
-
-
-
- Small
-
-
-
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/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 @@
-