Compare commits

..

86 Commits

Author SHA1 Message Date
Brandy Carney
c463b065c7 fix(action-sheet): remove ios inertia scroll to fix flicker
fixes #13262
2017-11-08 13:50:04 -05:00
Dan Bucholtz
5883da20fd chore(changelog): 3.9.1 changelog improvement 2017-11-08 12:33:28 -06:00
Dan Bucholtz
b224a65f22 chore(changelog): 3.9.1 changelog 2017-11-08 12:31:43 -06:00
Dan Bucholtz
e1948be1f8 chore(changelog): 3.9.0 changelog 2017-11-08 12:17:15 -06:00
Brandy Carney
248a1ceced fix(datetime): avoid adding cancel and done button repeatedly
references #7333
2017-11-08 12:55:22 -05:00
Dan Bucholtz
75cf887f91 refactor(input): revert input/highlight height change that broke snpashot 2017-11-07 15:12:15 -06:00
Dan Bucholtz
32c5bed546 chore(dependencies): revert to ng4 for distribution for now 2017-11-07 15:12:15 -06:00
Brandy Carney
4f3e91bdfa fix(action-sheet): move box-shadow to first group 2017-11-07 16:08:49 -05:00
mhartington
236e7f8393 fix(tabs): no safe area padding for top tabs 2017-11-07 10:34:37 -05:00
Daniel Sogl
ea710044ef chore(dependencies): update rxjs to 5.5.x
* chore(package): bump rxjs to 5.5

* Update package.json

* Update package.json
2017-11-06 14:50:33 -06:00
Daniel Sogl
efd6605f98 refactor(templates): HttpClient (#13067) 2017-11-06 14:46:52 -06:00
Daniel Sogl
aaa3cac917 refactor(slider-test): HttpClient (#13068) 2017-11-06 14:46:02 -06:00
Dan Bucholtz
4cc54eeb5d chore(build): remove angular, rxjs, and zone peer deps 2017-11-06 14:37:03 -06:00
Dan Bucholtz
cfdba88754 chore(build): pass param to app-scripts to avoid reading ionic-angular version info within the context of the ionic repo 2017-11-06 14:21:44 -06:00
Dan Bucholtz
7c583938a2 feature(dependencies): updates to support angular 5
* chore(dependencies): update to ng5 rc

* chore(dependencies): update for ng 5

* chore(build): remove closure support

* chore(dependencies): fix missing angular/common value
2017-11-06 12:41:18 -06:00
Perry Govier
d659676ba2 chore(CI): ignore CI builds on core for now 2017-11-02 09:55:24 -05:00
Iason Asimakopoulos
e555eae1f5 fix(alert): focus input after it is ready (#13259)
Fixes: #12784
2017-10-27 14:48:26 -05:00
Jérémy LE TRIONNAIRE
5742540a36 fix(tap-click): clear activated state on activable element when appropriate (#13258)
Fixes #13044
2017-10-27 13:17:23 -05:00
Michael Asimakopoulos
6978bb551f fix(VirtualScroll): stop from resizing while out of view (#13143) 2017-10-27 17:41:00 +02:00
Manu MA
e7ac15f9be fix(input): better support for WKKeyboard (#13106) 2017-10-27 17:40:10 +02:00
Brandy Carney
2ab8385ee0 fix(datetime): use spread operator to copy pickerOptions (#13202)
* fix(datetime): use spread operator to copy pickerOptions to keep functions

* style(datetime): fix typo in comment

fixes #11641
2017-10-27 17:39:24 +02:00
Ken Sodemann
616786b387 chore(): fix spelling fail 2017-10-27 06:06:24 -05:00
Ken Sodemann
6b5f9f113f chore(): minor changeling tweak 2017-10-27 06:03:38 -05:00
Ken Sodemann
2bba548253 chore(): add dependency change info to 3.8.0 upgrade instruction 2017-10-27 06:02:49 -05:00
mhartington
1497d83a0e style(lint): fix lint error 2017-10-26 14:02:12 -07:00
mhartington
7f7f60ede5 chore(): bump 2017-10-26 13:43:06 -07:00
mhartington
73f6a82446 fix(popover): improve positioning in ios11 2017-10-26 09:05:02 -07:00
Dan Bucholtz
893ef725e9 refactor(navigation): revert hacky change in url-serializer to account for scenario when toggling between one two views each with a set of tabs 2017-10-23 23:18:29 -05:00
mhartington
4ea843440b fix(): correct order of events 2017-10-22 19:41:25 -07:00
mhartington
f2946e77e6 fix(): correct event name 2017-10-20 20:32:27 -04:00
mhartington
ebdf22d2d3 fix(): move resize logic to viewCtrl 2017-10-20 16:09:43 -04:00
Jérémy LE TRIONNAIRE
dd66f9a7a9 fix(swiper): allow for multiple swipers on a page (#12213)
fixes #12008
2017-10-20 14:14:06 -05:00
mhartington
6b848a04b3 fix(content): reize on orientationchange only
Ref #13028
2017-10-19 17:54:05 -04:00
mhartington
af363581da fix(item): safe-padding on last item only 2017-10-19 15:17:19 -04:00
mhartington
33960f1a5a fix(cordova): size footer correctly
Ref #13054
2017-10-17 09:49:45 -04:00
Valentin
e5df0625b2 docs(nav-controller): change leave to enter matching guard name (#13155)
Update comment in Nav Guards when pushing new view.
Comment was the same as leaving a view. 'leave' to 'enter'. Correct ?
2017-10-16 05:25:33 -05:00
Zach Lawson
22747e3588 docs(slides): fix typo in code sample (#13091) 2017-10-11 13:28:17 -05:00
Ken Sodemann
dc280b4199 chore(): clean up the issue template 2017-10-11 12:40:42 -05:00
Dan Bucholtz
fae5365b12 refactor(tabs): remove unnecessary console.log 2017-10-10 15:57:16 -05:00
Max Lynch
ecde0ae70f Merge pull request #13104 from ionic-team/fix/11694
fix(tabs): emit viewDidEnter and viewDidLeave on app during tab change. ≈
2017-10-10 10:53:40 -05:00
Max Lynch
c8be8e254c fix(tabs): emit viewDidEnter and viewDidLeave on app during tab change 2017-10-10 10:49:58 -05:00
Dan Bucholtz
356240883e chore(dependencies): lock file update 2017-10-10 10:34:36 -05:00
Max Lynch
c4e9b5d343 fix(select): overlay types should use shared interface
Closes #13103
2017-10-10 10:43:12 -04:00
Dan Bucholtz
9f17b388d2 chore(dependencies): update lock file 2017-10-10 09:24:47 -05:00
Mike Hartington
49e0c3701a feat(): better ios11 support
* style(): better list design for ios

* fix(): fix lint issues

* fix(): more ios11 updates

* fix(): use env and constant for now

* fix(footer): user correct value for padding

* fix(): remove extra padding on title

* fix(): reorder imports to pass lint
2017-10-09 16:52:13 -04:00
Ken Sodemann
ee766e1de8 doc(defaultHistory): clarify the use of defaultHistory 2017-10-06 14:46:47 -05:00
Daniel Sogl
74c5871ac4 refactor(OpaqueToken): change deprecated import (#11916)
* refactor(OpaqueToken): ready for Angular 4.2

* Create app-root.ts

* Create config.ts

* Create url-serializer.ts

* Create platform-registry.ts

* Create module-loader.ts
2017-10-06 14:01:37 -05:00
Daniel Sogl
8ec70ee02a chore(dependencies): bump Angular and TypeScript(#13030) 2017-10-06 13:54:38 -05:00
Manu Mtz.-Almeida
ae4be669bb fix(nav): remove bad assert 2017-10-06 12:41:50 +02:00
Manu MA
c91223bfb2 fix(overlay): onWillDismiss is called as expected (#12056)
* fix(overlay): onWillDismiss is called as expected

fixes #11702

* Fix condition
2017-10-06 12:39:33 +02:00
Amit Moryossef
b1803510e3 feat(input): add dir attribute for different language directions (#13043) 2017-10-06 12:28:40 +02:00
Manu Mtz.-Almeida
70809caa8d test(virtual-scroll): update tests 2017-10-06 12:13:28 +02:00
Manu Mtz.-Almeida
88b2e8316d fix(virtual-scroll): flickering issue fixes
Squashed commit of the following:

commit 3497d401ba
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Wed Sep 20 10:52:39 2017 +0300

    Fix virtualScroll spec

commit c6a2a978a5
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Wed Sep 20 10:51:58 2017 +0300

    Fix virtualScroll e2e infiniteScroll test

commit 6eaf7d1e2b
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Wed Sep 20 09:40:01 2017 +0300

    Use const enums to reduce generated code

commit 564ef4179f
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Tue Sep 19 16:12:01 2017 +0300

    Recalculated nodes once more on scrollEnd

commit bfa44b9dc4
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Mon Sep 18 19:10:55 2017 +0300

    Remove needClean param from populateNodeData

commit 84d402d05d
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Mon Sep 18 19:06:06 2017 +0300

    Remove console.warn

commit 07e15d7074
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Mon Sep 18 17:50:14 2017 +0300

    Simplify adjustRendered function

commit 9b3b0db086
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Mon Sep 18 17:14:39 2017 +0300

    Use recordSize consistently

commit c8d5e09bd2
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Mon Sep 18 16:27:09 2017 +0300

    Fix top and bottom cells special cases

commit acec8eff5d
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Mon Sep 18 13:26:33 2017 +0300

    Update existing nodes by matching cells

commit 8590b9b5d4
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Mon Sep 18 13:25:00 2017 +0300

    Stop clearing DOM in slow path

commit e06d757471
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Fri Sep 15 17:20:18 2017 +0300

    Return records from VirtualScroll getter

commit a13184f9b3
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Fri Sep 15 15:12:31 2017 +0300

    Change comment

commit 75aed51b92
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Fri Sep 15 15:01:17 2017 +0300

    Stop looking for available nodes after one is found

commit ebef282654
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Fri Sep 15 14:49:36 2017 +0300

    Change TemplateType consts to enum

commit 21a7ce9cde
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Fri Sep 15 14:45:47 2017 +0300

    Stop searching nodes if cell is already rendered

commit 7d3b7c4a1b
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Fri Sep 15 14:36:11 2017 +0300

    Make debug logs consistent

commit a716e5814e
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Fri Sep 15 14:33:29 2017 +0300

    Simplify changes calculation

commit ad9c6d9b37
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Fri Sep 15 14:22:41 2017 +0300

    Simplify addCell function

commit 8e5774a027
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Fri Sep 15 14:17:03 2017 +0300

    Throw errors not strings

commit fdd9bd19ad
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Fri Sep 15 14:12:39 2017 +0300

    Initialize differ with trackByFunction as ngForOf does

commit 4cf1f3918e
Author: Michael Asimakopoulos <m.asimakopoulos@gmail.com>
Date:   Fri Sep 15 14:08:11 2017 +0300

    Convert queue consts to enum
2017-10-06 12:12:01 +02:00
Brandy Carney
199cb00444 fix(action-sheet): fix action sheet so it will scroll when the options exceed the screen (#13049)
* fix(action-sheet): add ability to scroll buttons in an action sheet

* fix(action-sheet): add scroll to buttons for all modes

* fix(select): add support for more than 6 options in action-sheet

* style(sass): fix linter error

* fix(action-sheet): add flex-shrink to all modes and fix border bleed

also adds variables for md and wp mode padding and removes unused
$action-sheet-md-group-margin-bottom var

* style(sass): fix linter errors

* refactor(action-sheet): remove duplicated overflow styles

* fix(action-sheet): get scroll working properly without cancel button

* fix(action-sheet): remove pointer events from wrapper
2017-10-06 11:45:49 +02:00
Dan Bucholtz
9bfd286dfa chore(dependencies): update app-scripts version to run latest nightly with deepLinkDir fix 2017-10-06 00:02:12 -05:00
Dan Bucholtz
ac4dd6fea2 chore(dependencies): update lock file 2017-10-05 21:51:26 -05:00
Dan Bucholtz
2646ebedf1 fix(navigation): add defaultHistory support to ion-tabs 2017-10-05 16:53:39 -05:00
Dan Bucholtz
a77bb2c1d5 fix(tabs): return promises where appropriate 2017-10-05 16:53:39 -05:00
Dan Bucholtz
c963745888 fix(navigation): account for condition of toggling one view with tabs to another view with tabs 2017-10-05 16:53:39 -05:00
Dan Bucholtz
2bd89feb0f fix(navigation): unregister root navs when appropriate 2017-10-05 16:53:39 -05:00
mhartington
c38cc28c5f doc(platform): copy edit 2017-10-03 09:45:37 -04:00
mhartington
9d4c94a7ac docs(platform): update resize method docs 2017-10-03 09:37:12 -04:00
Perry Govier
ad8d8ed2c3 chore(demos): setting demos target to es5 to get around safari 10 let bug 2017-10-02 15:15:17 -05:00
Alan Agius
0ba33d943f feat(alert): export AlertButton interface
Closes #12545
2017-10-02 11:57:00 -04:00
Ken Sodemann
e0c830962c fix(swiper): add safe-guards when user tries to zoom a slide without an image (#12931)
Fixes #12861
2017-09-29 17:41:29 -05:00
Ken Sodemann
dac887092e chore(): clarify upgrade instructions 2017-09-29 16:25:00 -05:00
Ken Sodemann
e5b3eb7c8b chore(): update changelog 2017-09-29 14:46:05 -05:00
Max Lynch
c60588a290 Merge branch 'jacek-jaskolski-datetime_default_value' 2017-09-29 14:11:46 -05:00
Max Lynch
77fcaef436 Updated initialValue and current time/max setup 2017-09-29 14:05:15 -05:00
Max Lynch
9c2181b8f9 Merge branch 'datetime_default_value' of https://github.com/jacek-jaskolski/ionic into jacek-jaskolski-datetime_default_value 2017-09-29 11:47:36 -05:00
Ken Sodemann
4db20a648c chore(): update to latest zone.js
Fixes: #13014
2017-09-29 11:35:05 -05:00
Max Lynch
f6d6596912 Remove fit
Formatting
2017-09-29 11:30:10 -05:00
Max Lynch
39e7da3840 fix(datetime): set default to max if max before current only #9846 2017-09-29 11:28:17 -05:00
Max Lynch
9b3fb78a68 fix trailing whitespace 2017-09-29 10:49:21 -05:00
Max Lynch
559f4d3bd5 feat(datetime): default to now or max. Fixes #9846 2017-09-29 10:45:58 -05:00
Suraj Kochale
f1a676e4c2 docs(): add more config values 2017-09-29 11:24:29 -04:00
Brandy Carney
1573043f4e chore(index): export ActionSheetButton
fixes #12719
2017-09-28 15:47:09 -04:00
Brandy Carney
0a49648fe8 style(cordova): fix indentation 2017-09-28 15:46:03 -04:00
Dan Bucholtz
599bf3df5e chore(build): minify/optimize demos by default, leave e2e non-minified and unoptimized by default 2017-09-28 11:09:04 -05:00
Dan Bucholtz
fce5d8a04f chore(dependencies): update app-scripts to 3.0.0 release 2017-09-28 10:35:44 -05:00
Brandy Carney
108fc0fc3f docs(changelog): copy editing 2017-09-28 11:14:47 -04:00
Dan Bucholtz
521402b548 chore(changelog): 3.0.0 changelog 2017-09-28 10:07:48 -05:00
Jacek Jaskólski
54cdf00454 test(datetime): add pickerDefault test 2017-08-18 14:29:21 +02:00
Jacek Jaskólski
5bb3e73296 test(datetime): add pickerDefault test 2017-08-18 14:26:01 +02:00
Jacek Jaskólski
ae94f5ecea test(datetime): add pickerDefault test 2017-08-18 14:21:12 +02:00
Jacek Jaskólski
b87d212829 feat(datetime): add default picker value input 2017-08-18 12:32:37 +02:00
225 changed files with 5424 additions and 1963 deletions

View File

@@ -1,7 +1,6 @@
**Resources:**
Before submitting an issue, please consult our troubleshooting guide (http://ionicframework.com/docs/troubleshooting/) and developer resources (http://ionicframework.com/docs/developer-resources/)
<!-- Before submitting an issue, please consult our troubleshooting guide (http://ionicframework.com/docs/troubleshooting/) and developer resources (http://ionicframework.com/docs/developer-resources/) -->
Please make sure you are posting an issue pertaining to the Ionic Framework. If you are having an issue with the Ionic Pro services (Ionic View, Ionic Deploy, etc.) please consult the Ionic Pro support portal (http://support.ionicjs.com)
<!-- Please make sure you are posting an issue pertaining to the Ionic Framework. If you are having an issue with the Ionic Pro services (Ionic View, Ionic Deploy, etc.) please consult the Ionic Pro support portal (http://support.ionicjs.com) -->
**Ionic version:** (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)

View File

@@ -1,3 +1,257 @@
<a name="3.9.1"></a>
## [3.9.1](https://github.com/ionic-team/ionic/compare/v3.9.0...v3.9.1) (2017-11-08)
## Upgrade Instructions
`ionic-angular` 3.9.1 is patch release of `ionic-angular` 3.9.0. To upgrade, follow the instructions [here](https://github.com/ionic-team/ionic/blob/master/CHANGELOG.md#390-2017-11-08) for updating to `ionic-angular` 3.9.0. After completing those steps, update the `ionic-angular` version to 3.9.1.
```
npm install ionic-angular@3.9.1 --save
```
### Bug Fixes
* **datetime:** avoid adding cancel and done button repeatedly ([248a1ce](https://github.com/ionic-team/ionic/commit/248a1ce))
<a name="3.9.0"></a>
# [3.9.0](https://github.com/ionic-team/ionic/compare/v3.8.0...v3.9.0) (2017-11-08)
### Upgrade Instructions
`ionic-angular` 3.9.0 adds support for `@angular` 5.0.0 :tada:! It is a drop-in replacement for `ionic-angular` 3.8.x.
To update, remove existing `node_modules` and any lock files, and then update `package.json` to the following deps.
```
"dependencies" : {
...
"@angular/common": "5.0.0",
"@angular/compiler": "5.0.0",
"@angular/compiler-cli": "5.0.0",
"@angular/core": "5.0.0",
"@angular/forms": "5.0.0",
"@angular/http": "5.0.0",
"@angular/platform-browser": "5.0.0",
"@angular/platform-browser-dynamic": "5.0.0",
"@ionic/storage": "2.1.3",
"ionic-angular": "3.9.0",
"rxjs": "5.5.2",
"zone.js": "0.8.18"
...
},
"devDependencies: {
"@ionic/app-scripts": "3.1.0"
"typescript" : "2.4.2"
}
```
If your app uses RXJS, see the instructions below to update.
### RXJS 5.5.2 Updates
The recent update of RXJS includes a change in how operators are applied.
Traditionally, operators were applied like this:
```typescript
import 'rxjs/add/operator/debounceTime';
import 'rxjs/add/operator/switchMap';
export MyClass {
someMethod(){
// Using Reactive Forms
this.input.valueChanges
.debounceTime(500)
.switchMap(inputVal => this.service.get(inputVal))
.subscribe(res => console.log(res))
}
}
```
This approach involved modifying the Observable prototype and patching on the
methods.
RXJS 5.5 introduces a different way to do this that can lead to significantly
smaller code bundles, lettable operators.
To use lettable operators, modify the code from above to look like this:
```typescript
//Use Deep imports here for smallest bunlde size
import { debounceTime } from 'rxjs/operators/debounceTime';
import { switch } from 'rxjs/operators/switchMap';
export MyClass {
someMethod(){
// Using Reactive Forms
// We use the new `.pipe` method on the observable
// too apply operators now
this.input.valueChanges
.pipe(
debounceTime(500),
switchMap(inputVal => this.service.get(inputVal))
)
.subscribe(res => console.log(res))
}
}
```
This slight change allows only import the operators we need in our code. This will result in a smaller, faster application. This example uses Deep Imports, which allow the module we want to import to be isolated.
Take a look at [this
doc](https://github.com/ReactiveX/rxjs/blob/master/doc/lettable-operators.md) for more information.
### Bug Fixes
* **action-sheet:** move box-shadow to first group ([4f3e91b](https://github.com/ionic-team/ionic/commit/4f3e91b))
* **alert:** focus input after it is ready ([#13259](https://github.com/ionic-team/ionic/issues/13259)) ([e555eae](https://github.com/ionic-team/ionic/commit/e555eae))
* **datetime:** use spread operator to copy pickerOptions ([#13202](https://github.com/ionic-team/ionic/issues/13202)) ([2ab8385](https://github.com/ionic-team/ionic/commit/2ab8385)), closes [#11641](https://github.com/ionic-team/ionic/issues/11641)
* **input:** better support for WKKeyboard ([#13106](https://github.com/ionic-team/ionic/issues/13106)) ([e7ac15f](https://github.com/ionic-team/ionic/commit/e7ac15f))
* **tabs:** no safe area padding for top tabs ([236e7f8](https://github.com/ionic-team/ionic/commit/236e7f8))
* **tap-click:** clear activated state on activable element when appropriate ([#13258](https://github.com/ionic-team/ionic/issues/13258)) ([5742540](https://github.com/ionic-team/ionic/commit/5742540)), closes [#13044](https://github.com/ionic-team/ionic/issues/13044)
* **VirtualScroll:** stop from resizing while out of view ([#13143](https://github.com/ionic-team/ionic/issues/13143)) ([6978bb5](https://github.com/ionic-team/ionic/commit/6978bb5))
<a name="3.8.0"></a>
# [3.8.0](https://github.com/ionic-team/ionic/compare/v3.7.1...v3.8.0) (2017-10-26)
### Upgrade Instructions
This release includes improvements for iOS11 and specifically, the iPhone X. Please also read over the [iOS 11 checklist](http://blog.ionic.io/ios-11-checklist/) blog post for additional information.
To update, install the latest version of `ionic-angular` and `@ionic/app-scripts`:
```bash
npm install ionic-angular@latest --save
npm install @ionic/app-scripts@latest --save-dev
```
This release uses version `4.4.4` of Angular. Please update the version number of any `@angular` packages in your `package.json` file:
```
"dependencies": {
"@angular/common": "4.4.4",
"@angular/compiler": "4.4.4",
"@angular/compiler-cli": "4.4.4",
"@angular/core": "4.4.4",
"@angular/forms": "4.4.4",
"@angular/http": "4.4.4",
"@angular/platform-browser": "4.4.4",
"@angular/platform-browser-dynamic": "4.4.4",
...
}
```
### Bug Fixes
* **action-sheet:** fix action sheet so it will scroll when the options exceed the screen ([#13049](https://github.com/ionic-team/ionic/issues/13049)) ([199cb00](https://github.com/ionic-team/ionic/commit/199cb00))
* **content:** reize on orientationchange only ([6b848a0](https://github.com/ionic-team/ionic/commit/6b848a0))
* **cordova:** size footer correctly ([33960f1](https://github.com/ionic-team/ionic/commit/33960f1))
* **item:** safe-padding on last item only ([af36358](https://github.com/ionic-team/ionic/commit/af36358))
* **nav:** remove bad assert ([ae4be66](https://github.com/ionic-team/ionic/commit/ae4be66))
* **navigation:** account for condition of toggling one view with tabs to another view with tabs ([c963745](https://github.com/ionic-team/ionic/commit/c963745))
* **navigation:** add defaultHistory support to ion-tabs ([2646ebe](https://github.com/ionic-team/ionic/commit/2646ebe))
* **navigation:** unregister root navs when appropriate ([2bd89fe](https://github.com/ionic-team/ionic/commit/2bd89fe))
* **overlay:** onWillDismiss is called as expected ([#12056](https://github.com/ionic-team/ionic/issues/12056)) ([c91223b](https://github.com/ionic-team/ionic/commit/c91223b)), closes [#11702](https://github.com/ionic-team/ionic/issues/11702)
* **popover:** improve positioning in ios11 ([73f6a82](https://github.com/ionic-team/ionic/commit/73f6a82))
* **select:** overlay types should use shared interface ([c4e9b5d](https://github.com/ionic-team/ionic/commit/c4e9b5d)), closes [#13103](https://github.com/ionic-team/ionic/issues/13103)
* **swiper:** add safe-guards when user tries to zoom a slide without an image ([#12931](https://github.com/ionic-team/ionic/issues/12931)) ([e0c8309](https://github.com/ionic-team/ionic/commit/e0c8309)), closes [#12861](https://github.com/ionic-team/ionic/issues/12861)
* **swiper:** allow for multiple swipers on a page ([#12213](https://github.com/ionic-team/ionic/issues/12213)) ([dd66f9a](https://github.com/ionic-team/ionic/commit/dd66f9a)), closes [#12008](https://github.com/ionic-team/ionic/issues/12008)
* **tabs:** emit viewDidEnter and viewDidLeave on app during tab change ([c8be8e2](https://github.com/ionic-team/ionic/commit/c8be8e2))
* **tabs:** return promises where appropriate ([a77bb2c](https://github.com/ionic-team/ionic/commit/a77bb2c))
* **virtual-scroll:** flickering issue fixes ([88b2e83](https://github.com/ionic-team/ionic/commit/88b2e83))
* **viewController** move resize logic to viewCtrl ([ebdf22d](https://github.com/ionic-team/ionic/commit/ebdf22d))
### Features
* **alert:** export AlertButton interface ([0ba33d9](https://github.com/ionic-team/ionic/commit/0ba33d9)), closes [#12545](https://github.com/ionic-team/ionic/issues/12545)
* **input:** add dir attribute for different language directions ([#13043](https://github.com/ionic-team/ionic/issues/13043)) ([b180351](https://github.com/ionic-team/ionic/commit/b180351))
* improved ios11 support ([49e0c37](https://github.com/ionic-team/ionic/commit/49e0c37))
<a name="3.7.1"></a>
## [3.7.1](https://github.com/ionic-team/ionic/compare/v3.7.0...v3.7.1) (2017-09-29)
### Upgrade Instructions
This release includes the latest version of `zone.js`. Update your `package.json` to match the following dependencies, remove the existing `node_modules` directory, and then run `npm install`:
```
"dependencies": {
...
"ionic-angular": "3.7.1",
...
"zone.js": "0.8.18"
}
```
### Bug Fixes
* **datetime:** set default to max if max before current only [#9846](https://github.com/ionic-team/ionic/issues/9846) ([39e7da3](https://github.com/ionic-team/ionic/commit/39e7da3))
### Features
* **datetime:** add default picker value input ([b87d212](https://github.com/ionic-team/ionic/commit/b87d212))
* **datetime:** default to now or max. Fixes [#9846](https://github.com/ionic-team/ionic/issues/9846) ([559f4d3](https://github.com/ionic-team/ionic/commit/559f4d3))
<a name="3.7.0"></a>
# [3.7.0](https://github.com/ionic-team/ionic/compare/v3.6.1...v3.7.0) (2017-09-28)
### Notes
This release adds support for the latest version of Angular (4.4.3) as well as the initial iteration of support for the iPhone X.
### Upgrade Instructions
These are the latest versions of `@angular`, `rxjs`, `zone.js` and `ionic-angular`. Update your `package.json` to match the following dependencies, remove the existing `node_modules` directory, and then run `npm install`:
```
...
"dependencies": {
"@angular/common": "4.4.3",
"@angular/compiler": "4.4.3",
"@angular/compiler-cli": "4.4.3",
"@angular/core": "4.4.3",
"@angular/forms": "4.4.3",
"@angular/http": "4.4.3",
"@angular/platform-browser": "4.4.3",
"@angular/platform-browser-dynamic": "4.4.3",
"ionic-angular": "3.7.0",
"rxjs": "5.4.3",
"zone.js": "0.8.17"
}
"devDependencies": {
"@ionic/app-scripts": "3.0.0"
}
...
```
If you're using a `package-lock.json` file, make sure that is updated as well.
### Bug Fixes
* **input:** mark ion-input touched on blur instead of changed ([#12812](https://github.com/ionic-team/ionic/issues/12812)) ([d0cad6b](https://github.com/ionic-team/ionic/commit/d0cad6b)), closes [#12102](https://github.com/ionic-team/ionic/issues/12102)
* **swiper:** change var to let to avoid variable shadowing ([f5ef1ca](https://github.com/ionic-team/ionic/commit/f5ef1ca))
### Features
* initial iphoneX support ([112d4f5](https://github.com/ionic-team/ionic/commit/112d4f5))
<a name="3.6.1"></a>
## [3.6.1](https://github.com/ionic-team/ionic/compare/v3.6.0...v3.6.1) (2017-09-07)

View File

@@ -7,6 +7,7 @@ jobs:
branches:
ignore:
- mono-refactor
- core
steps:
- checkout
- restore_cache:

2475
package-lock.json generated
View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "ionic2",
"version": "3.6.1",
"version": "3.9.1",
"description": "A powerful framework for building mobile and progressive web apps with JavaScript and Angular",
"keywords": [
"ionic",
@@ -26,20 +26,20 @@
"tsc": "tsc --outdir .tmp"
},
"dependencies": {
"@angular/common": "4.4.3",
"@angular/compiler": "4.4.3",
"@angular/compiler-cli": "4.4.3",
"@angular/core": "4.4.3",
"@angular/forms": "4.4.3",
"@angular/http": "4.4.3",
"@angular/platform-browser": "4.4.3",
"@angular/platform-browser-dynamic": "4.4.3",
"@angular/common": "4.4.6",
"@angular/compiler": "4.4.6",
"@angular/compiler-cli": "4.4.6",
"@angular/core": "4.4.6",
"@angular/forms": "4.4.6",
"@angular/http": "4.4.6",
"@angular/platform-browser": "4.4.6",
"@angular/platform-browser-dynamic": "4.4.6",
"ionicons": "~3.0.0",
"rxjs": "5.4.3",
"zone.js": "0.8.17"
"rxjs": "5.5.2",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "2.1.4-201709271749",
"@ionic/app-scripts": "nightly",
"@ionic/commit-hooks": "1.0.3",
"@types/connect": "3.4.30",
"@types/del": "2.2.31",
@@ -64,7 +64,7 @@
"canonical-path": "0.0.2",
"connect": "3.5.0",
"conventional-changelog": "1.1.0",
"core-js": "2.4.1",
"core-js": "2.5.1",
"cpr": "2.0.0",
"cross-spawn": "^5.1.0",
"del": "2.2.2",
@@ -134,7 +134,7 @@
"ts-node": "3.3.0",
"tslint": "^5.4.3",
"tslint-ionic-rules": "0.0.11",
"typescript": "~2.3.2",
"typescript": "~2.4.2",
"vinyl": "1.2.0",
"yargs": "5.0.0"
},
@@ -147,4 +147,4 @@
"pre-push#master": [
"test"
]
}
}

View File

@@ -1,6 +1,6 @@
import { task } from 'gulp';
import { join } from 'path';
import { DIST_BUILD_ROOT, DIST_BUILD_ES2015_ROOT, DIST_BUILD_UMD_ROOT, ES5, ES_2015, PROJECT_ROOT, UMD_MODULE } from '../constants';
import { DIST_BUILD_ES2015_ROOT, DIST_BUILD_ROOT, DIST_BUILD_UMD_ROOT, ES5, ES_2015, PROJECT_ROOT, UMD_MODULE } from '../constants';
import { copySourceToDest, createTempTsConfig, deleteFiles, runNgc, runTsc } from '../util';

View File

@@ -8,7 +8,7 @@ import * as s3 from 's3';
import { argv } from 'yargs';
import { DEMOS_SRC_ROOT, ES_2015, PROJECT_ROOT } from '../constants';
import { DEMOS_SRC_ROOT, ES_2015, ES5, PROJECT_ROOT } from '../constants';
import { createTempTsConfig, getFolderInfo, runAppScriptsBuild, writePolyfills } from '../util';
import * as pAll from 'p-all';
@@ -90,7 +90,7 @@ function buildDemo(filePath: string) {
const pathToWriteFile = join(distTestRoot, 'tsconfig.json');
const pathToReadFile = join(PROJECT_ROOT, 'tsconfig.json');
createTempTsConfig(includeGlob, ES_2015, ES_2015, pathToReadFile, pathToWriteFile, { removeComments: true});
createTempTsConfig(includeGlob, ES5, ES_2015, pathToReadFile, pathToWriteFile, { removeComments: true});
const sassConfigPath = join('scripts', 'demos', 'sass.config.js');
const copyConfigPath = join('scripts', 'demos', 'copy.config.js');
@@ -99,6 +99,10 @@ function buildDemo(filePath: string) {
const appNgModulePath = join(dirname(filePath), 'app.module.ts');
const distDir = join(distTestRoot, 'www');
const minifyCss = argv.noMinifyCss ? false : true;
const minifyJs = argv.noMinifyJs ? false : true;
const optimizeJs = argv.noOptimizeJs ? false : true;
return runAppScriptsBuild(
appEntryPoint,
appNgModulePath,
@@ -107,7 +111,11 @@ function buildDemo(filePath: string) {
pathToWriteFile,
ionicAngularDir,
sassConfigPath,
copyConfigPath
copyConfigPath,
false,
minifyCss,
minifyJs,
optimizeJs
).then(() => {
const end = Date.now();
console.log(`${filePath} took a total of ${(end - start) / 1000} seconds to build`);

View File

@@ -133,7 +133,11 @@ function buildTest(filePath: string) {
const appNgModulePath = join(dirname(appEntryPoint), 'app.module.ts');
const distDir = join(distTestRoot, 'www');
return runAppScriptsBuild(appEntryPoint, appNgModulePath, ionicAngularDir, distDir, pathToWriteFile, ionicAngularDir, sassConfigPath, copyConfigPath, argv.dev).then(() => {
const minifyCss = argv.minifyCss ? true : false;
const minifyJs = argv.minifyJs ? true : false;
const optimizeJs = argv.optimizeJs ? true : false;
return runAppScriptsBuild(appEntryPoint, appNgModulePath, ionicAngularDir, distDir, pathToWriteFile, ionicAngularDir, sassConfigPath, copyConfigPath, argv.dev, minifyCss, minifyJs, optimizeJs).then(() => {
const end = Date.now();
console.log(`${filePath} took a total of ${(end - start) / 1000} seconds to build`);
}).catch((err) => {

View File

@@ -12,7 +12,7 @@ import * as runSequence from 'run-sequence';
import * as semver from 'semver';
import { obj } from 'through2';
import { DIST_BUILD_UMD_BUNDLE_ENTRYPOINT, DIST_BUILD_ROOT, DIST_BUNDLE_ROOT, PROJECT_ROOT, SCRIPTS_ROOT, SRC_ROOT } from '../constants';
import { DIST_BUILD_ROOT, DIST_BUILD_UMD_BUNDLE_ENTRYPOINT, DIST_BUNDLE_ROOT, PROJECT_ROOT, SCRIPTS_ROOT, SRC_ROOT } from '../constants';
import { compileSass, copyFonts, createTimestamp, setSassIonicVersion, writePolyfills } from '../util';
var promptAnswers;
@@ -85,7 +85,7 @@ task('release.publishGithubRelease', (done: Function) => {
return changelog({
preset: 'angular'
})
.pipe(obj(function(file, enc, cb){
.pipe(obj(function(file, enc, cb) {
github.releases.createRelease({
owner: 'ionic-team',
repo: 'ionic',

View File

@@ -1,8 +1,8 @@
import { spawn } from 'cross-spawn';
import { NODE_MODULES_ROOT, SRC_ROOT } from './constants';
import { src, dest } from 'gulp';
import { dirname, join } from 'path';
import { ensureDirSync, readdirSync, readFile, readFileSync, statSync, writeFile, writeFileSync } from 'fs-extra';
import { dest, src } from 'gulp';
import { dirname, join, resolve } from 'path';
import { ensureDirSync, readFile, readFileSync, readdirSync, statSync, writeFile, writeFileSync } from 'fs-extra';
import { rollup } from 'rollup';
import { Replacer } from 'strip-function';
import * as commonjs from 'rollup-plugin-commonjs';
@@ -25,10 +25,10 @@ export function mergeObjects(obj1: any, obj2: any ) {
obj2 = {};
}
var obj3 = {};
for (var attrname in obj1) {
for (let attrname in obj1) {
(<any>obj3)[attrname] = obj1[attrname];
}
for (var attrname in obj2) {
for (let attrname in obj2) {
(<any>obj3)[attrname] = obj2[attrname];
}
return obj3;
@@ -214,7 +214,8 @@ export function runAppScriptsServe(testOrDemoName: string, appEntryPoint: string
'--ionicAngularDir', ionicAngularDir,
'--sass', sassConfigPath,
'--copy', copyConfigPath,
'--enableLint', 'false'
'--enableLint', 'false',
'--skipIonicAngularVersion', 'true'
];
if (devApp) {
scriptArgs.push('--bonjour');
@@ -246,10 +247,10 @@ export function runAppScriptsServe(testOrDemoName: string, appEntryPoint: string
});
}
export function runAppScriptsBuild(appEntryPoint: string, appNgModulePath: string, srcDir: string, distDir: string, tsConfig: string, ionicAngularDir: string, sassConfigPath: string, copyConfigPath: string, isDev: boolean = false) {
export function runAppScriptsBuild(appEntryPoint: string, appNgModulePath: string, srcDir: string, distDir: string, tsConfig: string, ionicAngularDir: string, sassConfigPath: string, copyConfigPath: string, isDev: boolean = false, minifyCss: boolean = true, minifyJs: boolean = true, optimizeJs: boolean = true) {
const pathToAppScripts = join(NODE_MODULES_ROOT, '.bin', 'ionic-app-scripts');
const debug: boolean = argv.debug;
return runWorker(pathToAppScripts, debug, appEntryPoint, appNgModulePath, srcDir, distDir, tsConfig, ionicAngularDir, sassConfigPath, copyConfigPath, isDev);
return runWorker(pathToAppScripts, debug, appEntryPoint, appNgModulePath, srcDir, distDir, tsConfig, ionicAngularDir, sassConfigPath, copyConfigPath, isDev, minifyCss, minifyJs, optimizeJs);
}
/** Resolves the path for a node package executable. */
@@ -349,6 +350,8 @@ function bundlePolyfill(pathsToIncludeInPolyfill: string[], outputPath: string)
moduleName: 'MyBundle',
dest: outputPath
});
}).catch(err => {
console.log('caught rollup error: ', err);
});
}

View File

@@ -3,7 +3,7 @@ import { dirname, join } from 'path';
import { MessageToWorker, WorkerProcess } from './interfaces';
export function runWorker(pathToAppScripts: string, debug: boolean, appEntryPoint: string, appNgModulePath: string, srcDir: string, distDir: string, tsConfig: string, ionicAngularDir: string, sassConfigPath: string, copyConfigPath: string, isDev: boolean) {
export function runWorker(pathToAppScripts: string, debug: boolean, appEntryPoint: string, appNgModulePath: string, srcDir: string, distDir: string, tsConfig: string, ionicAngularDir: string, sassConfigPath: string, copyConfigPath: string, isDev: boolean, minifyCss: boolean, minifyJs: boolean, optimizeJs: boolean) {
return new Promise((resolve, reject) => {
const msgToWorker: MessageToWorker = {
@@ -17,7 +17,10 @@ export function runWorker(pathToAppScripts: string, debug: boolean, appEntryPoin
ionicAngularDir: ionicAngularDir,
sassConfigPath: sassConfigPath,
copyConfigPath: copyConfigPath,
isDev: isDev
isDev: isDev,
minifyCss: minifyCss,
minifyJs: minifyJs,
optimizeJs: optimizeJs
};
const worker = <ChildProcess>createWorker(msgToWorker);
@@ -73,6 +76,7 @@ export function createWorker(msg: MessageToWorker): any {
'--sass', msg.sassConfigPath,
'--copy', msg.copyConfigPath,
'--enableLint', 'false',
'--skipIonicAngularVersion', 'true'
];
// TODO, use prod once we're a little more settled
@@ -84,6 +88,18 @@ export function createWorker(msg: MessageToWorker): any {
scriptArgs.push('--debug');
}
if (msg.minifyJs) {
scriptArgs.push('--minifyJs');
}
if (msg.minifyCss) {
scriptArgs.push('--minifyCss');
}
if (msg.optimizeJs) {
scriptArgs.push('--optimizeJs');
}
const workerModule = join(process.cwd(), 'node_modules', '@ionic', 'app-scripts', 'bin', 'ionic-app-scripts.js');
const worker = fork(workerModule, scriptArgs, {
env: {

View File

@@ -2,7 +2,7 @@
export interface WorkerProcess {
appEntryPoint: string;
worker: any;
};
}
export interface MessageToWorker {
pathToAppScripts: string;
@@ -16,4 +16,8 @@ export interface MessageToWorker {
sassConfigPath: string;
copyConfigPath: string;
isDev: boolean;
};
minifyJs: boolean;
minifyCss: boolean;
optimizeJs: boolean;
}

View File

@@ -12,15 +12,5 @@
"module": "index.js",
"es2015": "es2015/index.js",
"peerDependencies": {
"@angular/common": "",
"@angular/compiler": "",
"@angular/compiler-cli": "",
"@angular/core": "",
"@angular/forms": "",
"@angular/http": "",
"@angular/platform-browser": "",
"@angular/platform-browser-dynamic": "",
"rxjs": "",
"zone.js": ""
}
}

View File

@@ -1,6 +1,5 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';
/*
Generated class for the $CLASSNAME provider.
@@ -11,7 +10,7 @@ import 'rxjs/add/operator/map';
@Injectable()
export class $CLASSNAME {
constructor(public http: Http) {
constructor(public http: HttpClient) {
console.log('Hello $CLASSNAME Provider');
}

View File

@@ -26,7 +26,7 @@ import { ViewController } from '../../navigation/view-controller';
'{{b.text}}' +
'</button>' +
'</div>' +
'<div class="action-sheet-group" *ngIf="cancelButton">' +
'<div class="action-sheet-group action-sheet-group-cancel" *ngIf="cancelButton">' +
'<button ion-button="action-sheet-button" (click)="click(cancelButton)" class="action-sheet-cancel disable-hover" [attr.icon-start]="cancelButton.icon ? \'\' : null" [ngClass]="cancelButton.cssClass">' +
'<ion-icon [name]="cancelButton.icon" *ngIf="cancelButton.icon" class="action-sheet-icon"></ion-icon>' +
'{{cancelButton.text}}' +

View File

@@ -21,6 +21,9 @@ $action-sheet-ios-padding-bottom: $action-sheet-ios-paddin
/// @prop - Padding start of the action sheet
$action-sheet-ios-padding-start: $action-sheet-ios-padding-end !default;
/// @prop - Top margin of the action sheet button group
$action-sheet-ios-group-margin-top: 10px !default;
/// @prop - Bottom margin of the action sheet button group
$action-sheet-ios-group-margin-bottom: 10px !default;
@@ -90,7 +93,8 @@ $action-sheet-ios-button-cancel-font-weight: 600 !default;
}
.action-sheet-ios .action-sheet-wrapper {
@include margin(auto, auto, constant(safe-area-inset-bottom), auto);
@include margin(constant(safe-area-inset-top), auto, constant(safe-area-inset-bottom), auto);
@include margin(env(safe-area-inset-top), auto, env(safe-area-inset-bottom), auto);
}
.action-sheet-ios .action-sheet-container {
@@ -103,9 +107,19 @@ $action-sheet-ios-button-cancel-font-weight: 600 !default;
@include border-radius($action-sheet-ios-border-radius);
@include margin(null, null, $action-sheet-ios-group-margin-bottom - 2, null);
overflow: hidden;
background: $action-sheet-ios-background;
// scss-lint:disable VendorPrefix
// TODO Removing this temporarily because it causes a flicker
// when there are not enough elements to overflow
// https://github.com/ionic-team/ionic/issues/13262
// -webkit-overflow-scrolling: touch;
// Prevents borders from going outside of the container
// -webkit-mask-image: -webkit-radial-gradient(circle, #fff, #000);
}
.action-sheet-ios .action-sheet-group:first-child {
@include margin($action-sheet-ios-group-margin-top, null, null, null);
}
.action-sheet-ios .action-sheet-group:last-child {

View File

@@ -9,8 +9,11 @@ $action-sheet-md-text-align: start !default;
/// @prop - Background color of the action sheet
$action-sheet-md-background: #fafafa !default;
/// @prop - Bottom margin of the action sheet button group
$action-sheet-md-group-margin-bottom: 8px !default;
/// @prop - Padding top of the action sheet
$action-sheet-md-padding-top: .8rem !default;
/// @prop - Padding bottom of the action sheet
$action-sheet-md-padding-bottom: .8rem !default;
/// @prop - Color of the action sheet title
$action-sheet-md-title-color: #757575 !default;
@@ -90,11 +93,6 @@ $action-sheet-md-icon-margin-bottom: 0 !default;
/// @prop - Margin start of the icon in the action sheet button
$action-sheet-md-icon-margin-start: 0 !default;
.action-sheet-md .action-sheet-container {
@include padding(.8rem, 0);
background: $action-sheet-md-background;
}
.action-sheet-md .action-sheet-title {
@include text-align($action-sheet-md-text-align);
@@ -144,7 +142,15 @@ $action-sheet-md-icon-margin-start: 0 !default;
}
.action-sheet-md .action-sheet-group {
overflow: hidden;
background: $action-sheet-md-background;
}
.action-sheet-md .action-sheet-group:first-child {
@include padding($action-sheet-md-padding-top, null, null, null);
}
.action-sheet-md .action-sheet-group:last-child {
@include padding(null, null, $action-sheet-md-padding-bottom, null);
}
.action-sheet-md .action-sheet-group .button-inner {

View File

@@ -22,7 +22,7 @@ ion-action-sheet {
}
.action-sheet-wrapper {
@include position(null, 0, 0, 0);
@include position(0, 0, 0, 0);
@include margin(auto);
@include transform(translate3d(0, 100%, 0));
@@ -32,8 +32,35 @@ ion-action-sheet {
width: $action-sheet-width;
max-width: $action-sheet-max-width;
pointer-events: none;
}
.action-sheet-button {
width: $action-sheet-width;
}
.action-sheet-container {
display: flex;
flex-flow: column;
justify-content: flex-end;
height: 100%;
max-height: 100%;
}
.action-sheet-group {
overflow: scroll;
flex-shrink: 2;
pointer-events: all;
}
.action-sheet-group-cancel {
overflow: hidden;
flex-shrink: 0;
}

View File

@@ -9,6 +9,12 @@ $action-sheet-wp-text-align: start !default;
/// @prop - Background color of the action sheet
$action-sheet-wp-background: #fff !default;
/// @prop - Padding top of the action sheet
$action-sheet-wp-padding-top: .8rem !default;
/// @prop - Padding bottom of the action sheet
$action-sheet-wp-padding-bottom: .8rem !default;
/// @prop - Box shadow color of the action sheet
$action-sheet-wp-box-shadow-color: rgba(0, 0, 0, .2) !default;
@@ -100,10 +106,6 @@ $action-sheet-wp-icon-margin-bottom: 0 !default;
$action-sheet-wp-icon-margin-start: 0 !default;
.action-sheet-wp .action-sheet-wrapper {
box-shadow: $action-sheet-wp-box-shadow;
}
.action-sheet-wp .action-sheet-title {
@include text-align($action-sheet-wp-title-text-align);
@@ -147,12 +149,20 @@ $action-sheet-wp-icon-margin-start: 0 !default;
}
}
.action-sheet-wp .action-sheet-container {
@include padding(.8rem, 0);
.action-sheet-wp .action-sheet-group {
background: $action-sheet-wp-background;
}
.action-sheet-wp .action-sheet-group:first-child {
@include padding($action-sheet-wp-padding-top, null, null, null);
box-shadow: $action-sheet-wp-box-shadow;
}
.action-sheet-wp .action-sheet-group:last-child {
@include padding(null, null, $action-sheet-wp-padding-bottom, null);
}
.action-sheet-wp .action-sheet-group .button-inner {
justify-content: flex-start;
}

View File

@@ -9,9 +9,12 @@
<ion-content padding>
<button ion-button block class="e2eOpenActionSheet" (click)="presentActionSheet1()">Present Action Sheet 1</button>
<button ion-button block (click)="presentActionSheet2()">Present Action Sheet 2</button>
<button ion-button block (click)="presentActionSheet3()">Present Action Sheet 3</button>
<button ion-button block class="e2eOpenActionSheet" (click)="presentBasic()">Basic</button>
<button ion-button block (click)="presentNoBackdropDismiss()">No Backdrop Dismiss</button>
<button ion-button block (click)="presentAlert()">Alert from Action Sheet</button>
<button ion-button block (click)="presentScroll()">Scrollable Options</button>
<button ion-button block (click)="presentScrollNoCancel()">Scroll Without Cancel</button>
<button ion-button block (click)="presentCancelOnly()">Cancel Only</button>
<pre>
Result: {{result}}

View File

@@ -12,7 +12,7 @@ export class PageOne {
constructor(public actionSheetCtrl: ActionSheetController, public alertCtrl: AlertController, public modalCtrl: ModalController, public plt: Platform) {}
presentActionSheet1() {
presentBasic() {
this.result = '';
this.actionSheetCtrl.create()
@@ -66,7 +66,7 @@ export class PageOne {
.present();
}
presentActionSheet2() {
presentNoBackdropDismiss() {
this.result = '';
let actionSheet = this.actionSheetCtrl.create({
@@ -102,7 +102,7 @@ export class PageOne {
actionSheet.present(actionSheet);
}
presentActionSheet3() {
presentAlert() {
this.result = '';
let actionSheet = this.actionSheetCtrl.create({
@@ -150,4 +150,168 @@ export class PageOne {
actionSheet.present();
}
presentScroll() {
let actionSheet = this.actionSheetCtrl.create({
buttons: [
{
text: 'Add Reaction',
handler: () => {
console.log('Add Reaction clicked');
}
}, {
text: 'Copy Text',
handler: () => {
console.log('Copy Text clicked');
}
}, {
text: 'Share Text',
handler: () => {
console.log('Share Text clicked');
}
}, {
text: 'Copy Link to Message',
handler: () => {
console.log('Copy Link to Message clicked');
}
}, {
text: 'Remind Me',
handler: () => {
console.log('Remind Me clicked');
}
}, {
text: 'Pin File',
handler: () => {
console.log('Pin File clicked');
}
}, {
text: 'Star File',
handler: () => {
console.log('Star File clicked');
}
}, {
text: 'Mark Unread',
handler: () => {
console.log('Mark Unread clicked');
}
}, {
text: 'Edit Title',
handler: () => {
console.log('Edit Title clicked');
}
}, {
text: 'Save Image',
handler: () => {
console.log('Save Image clicked');
}
}, {
text: 'Copy Image',
handler: () => {
console.log('Copy Image clicked');
}
}, {
text: 'Delete File',
role: 'destructive',
handler: () => {
console.log('Delete File clicked');
}
}, {
text: 'Cancel',
role: 'cancel', // will always sort to be on the bottom
handler: () => {
console.log('Cancel clicked');
}
}
]
});
actionSheet.present();
}
presentScrollNoCancel() {
let actionSheet = this.actionSheetCtrl.create({
buttons: [
{
text: 'Add Reaction',
handler: () => {
console.log('Add Reaction clicked');
}
}, {
text: 'Copy Text',
handler: () => {
console.log('Copy Text clicked');
}
}, {
text: 'Share Text',
handler: () => {
console.log('Share Text clicked');
}
}, {
text: 'Copy Link to Message',
handler: () => {
console.log('Copy Link to Message clicked');
}
}, {
text: 'Remind Me',
handler: () => {
console.log('Remind Me clicked');
}
}, {
text: 'Pin File',
handler: () => {
console.log('Pin File clicked');
}
}, {
text: 'Star File',
handler: () => {
console.log('Star File clicked');
}
}, {
text: 'Mark Unread',
handler: () => {
console.log('Mark Unread clicked');
}
}, {
text: 'Edit Title',
handler: () => {
console.log('Edit Title clicked');
}
}, {
text: 'Save Image',
handler: () => {
console.log('Save Image clicked');
}
}, {
text: 'Copy Image',
handler: () => {
console.log('Copy Image clicked');
}
}, {
text: 'Delete File',
role: 'destructive',
handler: () => {
console.log('Delete File clicked');
}
}
]
});
actionSheet.present();
}
presentCancelOnly() {
let actionSheet = this.actionSheetCtrl.create({
buttons: [
{
text: 'Cancel',
role: 'cancel', // will always sort to be on the bottom
handler: () => {
console.log('Cancel clicked');
}
}
]
});
actionSheet.present();
}
}

View File

@@ -52,7 +52,7 @@ import { AlertButton, AlertInputOptions, AlertOptions } from './alert-options';
'<ng-template ngSwitchDefault>' +
'<div class="alert-input-group">' +
'<div *ngFor="let i of d.inputs" class="alert-input-wrapper">' +
'<input [placeholder]="i.placeholder" [(ngModel)]="i.value" [type]="i.type" [min]="i.min" [max]="i.max" [attr.id]="i.id" class="alert-input">' +
'<input [placeholder]="i.placeholder" [(ngModel)]="i.value" [type]="i.type" dir="auto" [min]="i.min" [max]="i.max" [attr.id]="i.id" class="alert-input">' +
'</div>' +
'</div>' +
'</ng-template>' +
@@ -204,7 +204,7 @@ export class AlertCmp {
// and ionViewDidEnter is not in the same callstack as the touch event :(
const focusableEle = this._elementRef.nativeElement.querySelector('input,button');
if (focusableEle) {
focusableEle.focus();
setTimeout(() => focusableEle.focus());
}
this.enabled = true;
}

View File

@@ -1,4 +1,4 @@
import { Component, ComponentFactoryResolver, ElementRef, Inject, OnInit, OpaqueToken, Renderer, ViewChild, ViewContainerRef } from '@angular/core';
import { Component, ComponentFactoryResolver, ElementRef, Inject, InjectionToken, OnInit, Renderer, ViewChild, ViewContainerRef } from '@angular/core';
import { App } from './app';
import { assert } from '../../util/util';
@@ -8,7 +8,7 @@ import { OverlayPortal } from './overlay-portal';
import { Platform } from '../../platform/platform';
import * as Constants from './app-constants';
export const AppRootToken = new OpaqueToken('USERROOT');
export const AppRootToken = new InjectionToken<any>('USERROOT');
/**
* @hidden

View File

@@ -274,6 +274,13 @@ export class App {
this._rootNavs.set(nav.id, nav);
}
/**
* @hidden
*/
unregisterRootNav(nav: NavigationContainer) {
this._rootNavs.delete(nav.id);
}
getActiveNavContainers(): NavigationContainer[] {
// for each root nav container, get it's active nav

View File

@@ -10,7 +10,7 @@ describe('App', () => {
describe('goBack', () => {
it('should not select the previous tab', () => {
it('should not select the previous tab', (done: Function) => {
const nav = mockNavController();
app.registerRootNav(nav);
@@ -23,24 +23,26 @@ describe('App', () => {
nav.registerChildNav(tabs);
tabs.select(tab1);
tabs.select(tab2);
expect(tabs._selectHistory).toEqual([tab1.id, tab2.id]);
spyOn(plt, 'exitApp');
spyOn(tabs, 'select');
spyOn(tab1, 'pop');
spyOn(tab2, 'pop');
spyOn(portal, 'pop');
app.goBack();
expect(tabs.select).not.toHaveBeenCalled();
expect(tab1.pop).not.toHaveBeenCalled();
expect(tab2.pop).not.toHaveBeenCalled();
expect(portal.pop).not.toHaveBeenCalled();
expect(plt.exitApp).toHaveBeenCalled();
tabs.select(tab1).then(() => {
return tabs.select(tab2);
}).then(() => {
expect(tabs._selectHistory).toEqual([tab1.id, tab2.id]);
spyOn(plt, 'exitApp');
spyOn(tabs, 'select');
spyOn(tab1, 'pop');
spyOn(tab2, 'pop');
spyOn(portal, 'pop');
return app.goBack();
}).then(() => {
expect(tabs.select).not.toHaveBeenCalled();
expect(tab1.pop).not.toHaveBeenCalled();
expect(tab2.pop).not.toHaveBeenCalled();
expect(portal.pop).not.toHaveBeenCalled();
expect(plt.exitApp).toHaveBeenCalled();
done();
}).catch((err: Error) => {
done(err);
});
});
it('should pop from the active tab, when tabs is nested is the root nav', () => {

View File

@@ -124,10 +124,6 @@ ion-app [no-padding] .scroll-content {
@include safe-area-padding($content-padding);
}
ion-app.#{$mode} .scroll-content {
@include safe-area-no-padding($content-padding);
}
ion-app.#{$mode} [padding-top] .scroll-content {
@include safe-area-padding($content-padding, null, null, null);
}

View File

@@ -1,4 +1,4 @@
import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostListener, Input, NgZone, OnDestroy, Optional, Output, Renderer, ViewChild, ViewEncapsulation } from '@angular/core';
import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, NgZone, OnDestroy, Optional, Output, Renderer, ViewChild, ViewEncapsulation } from '@angular/core';
import { App } from '../app/app';
import { Config } from '../../config/config';
@@ -227,6 +227,8 @@ export class Content extends Ion implements OnDestroy, AfterViewInit, IContent {
/** @internal */
_scrollDownOnLoad: boolean = false;
_viewCtrl: any;
private _imgReqBfr: number;
private _imgRndBfr: number;
private _imgVelMax: number;
@@ -410,6 +412,8 @@ export class Content extends Ion implements OnDestroy, AfterViewInit, IContent {
}
if (viewCtrl) {
this._viewCtrl = viewCtrl;
// content has a view controller
viewCtrl._setIONContent(this);
viewCtrl._setIONContentRef(elementRef);
@@ -635,6 +639,10 @@ export class Content extends Ion implements OnDestroy, AfterViewInit, IContent {
*/
addScrollPadding(newPadding: number) {
assert(typeof this._scrollPadding === 'number', '_scrollPadding must be a number');
if (newPadding === 0) {
this._inputPolling = false;
this._scrollPadding = -1;
}
if (newPadding > this._scrollPadding) {
console.debug(`content, addScrollPadding, newPadding: ${newPadding}, this._scrollPadding: ${this._scrollPadding}`);
@@ -659,18 +667,17 @@ export class Content extends Ion implements OnDestroy, AfterViewInit, IContent {
this._keyboard.onClose(() => {
console.debug(`content, clearScrollPaddingFocusOut _keyboard.onClose`);
this._inputPolling = false;
this._scrollPadding = -1;
this.addScrollPadding(0);
}, 200, 3000);
}
}
/**
* Tell the content to recalculate its dimensions. This should be called
* after dynamically adding/removing headers, footers, or tabs.
*/
@HostListener('window:resize')
resize() {
this._dom.read(this._readDimensions.bind(this));
this._dom.write(this._writeDimensions.bind(this));

View File

@@ -8,10 +8,11 @@ import { PickerColumn } from '../picker/picker-options';
import { Form } from '../../util/form';
import { BaseInput } from '../../util/base-input';
import { Item } from '../item/item';
import { assert, clamp, deepCopy, isArray, isBlank, isObject, isPresent, isString } from '../../util/util';
import { assert, clamp, isArray, isBlank, isObject, isPresent, isString } from '../../util/util';
import {
DateTimeData,
LocaleData,
compareDates,
convertDataToISO,
convertFormatToKey,
dateDataSortValue,
@@ -321,6 +322,14 @@ export class DateTime extends BaseInput<DateTimeData> implements AfterContentIni
*/
@Input() displayFormat: string;
/**
* @input {string} The default datetime selected in picker modal if field value is empty.
* Value must be a date string following the
* [ISO 8601 datetime format standard](https://www.w3.org/TR/NOTE-datetime),
* `1996-12-19`.
*/
@Input() initialValue: string;
/**
* @input {string} The format of the date and time picker columns the user selects.
* A datetime input can have one or many datetime parts, each getting their
@@ -510,22 +519,26 @@ export class DateTime extends BaseInput<DateTimeData> implements AfterContentIni
if (this.isFocus() || this._disabled) {
return;
}
console.debug('datetime, open picker');
// the user may have assigned some options specifically for the alert
const pickerOptions = deepCopy(this.pickerOptions);
// the user may have assigned some options specifically for the picker
const pickerOptions = {...this.pickerOptions};
// Configure picker under the hood
const picker = this._picker = this._pickerCtrl.create(pickerOptions);
picker.addButton({
// Add a cancel and done button by default to the picker
const defaultButtons = [{
text: this.cancelText,
role: 'cancel',
handler: () => this.ionCancel.emit(this)
});
picker.addButton({
}, {
text: this.doneText,
handler: (data: any) => this.value = data,
});
}];
pickerOptions.buttons = (pickerOptions.buttons || []).concat(defaultButtons);
// Configure picker under the hood
const picker = this._picker = this._pickerCtrl.create(pickerOptions);
picker.ionChange.subscribe(() => {
this.validate();
@@ -598,7 +611,7 @@ export class DateTime extends BaseInput<DateTimeData> implements AfterContentIni
// cool, we've loaded up the columns with options
// preselect the option for this column
const optValue = getValueFromFormat(this.getValue(), format);
const optValue = getValueFromFormat(this.getValueOrDefault(), format);
const selectedIndex = column.options.findIndex(opt => opt.value === optValue);
if (selectedIndex >= 0) {
// set the select index for this column's options
@@ -774,6 +787,51 @@ export class DateTime extends BaseInput<DateTimeData> implements AfterContentIni
return this._value;
}
/**
* @hidden
*/
getValueOrDefault(): DateTimeData {
if (this.hasValue()) {
return this._value;
}
const initialDateString = this.getDefaultValueDateString();
const _default = {};
updateDate(_default, initialDateString);
return _default;
}
/**
* Get the default value as a date string
* @hidden
*/
getDefaultValueDateString() {
if (this.initialValue) {
return this.initialValue;
}
const nowString = (new Date).toISOString();
if (this.max) {
const now = parseDate(nowString);
const max = parseDate(this.max);
let v;
for (let i in max) {
v = (<any>max)[i];
if (v === null) {
(<any>max)[i] = (<any>now)[i];
}
}
const diff = compareDates(now, max);
// If max is before current time, return max
if (diff > 0) {
return this.max;
}
}
return nowString;
}
/**
* @hidden
*/
@@ -837,7 +895,6 @@ export class DateTime extends BaseInput<DateTimeData> implements AfterContentIni
}
}
}
}
/**

View File

@@ -16,7 +16,12 @@
<ion-item>
<ion-label>MM DD YY</ion-label>
<ion-datetime displayFormat="MM DD YY" [(ngModel)]="placeholderDate" placeholder="Select Date"></ion-datetime>
<ion-datetime pickerFormat="YYYY-MM-DDThh:mm" [pickerOptions]="customOptions" [(ngModel)]="placeholderDate" placeholder="Select Date"></ion-datetime>
</ion-item>
<ion-item>
<ion-label>MM DD YY</ion-label>
<ion-datetime displayFormat="MM DD YY" [(ngModel)]="placeholderDate" placeholder="Select Date" initialValue="1987-10-19"></ion-datetime>
</ion-item>
<ion-item>
@@ -77,6 +82,11 @@
<ion-datetime monthValues="6,7,8" yearValues="2014,2015" dayValues="01,02,03,04,05,06,08,09,10, 11, 12, 13, 14" displayFormat="DD/MMM/YYYY" [(ngModel)]="specificDaysMonthsYears"></ion-datetime>
</ion-item>
<ion-item>
<ion-label>Default value</ion-label>
<ion-datetime max="2100" pickerDefault="2017-08-06" [(ngModel)]="defaultValue"></ion-datetime>
</ion-item>
<p aria-hidden="true" padding>
<code>monthOnly: {{monthOnly}}</code><br>
<code>wwwInvented: {{wwwInvented}}</code><br>
@@ -88,6 +98,7 @@
<code>time: {{time}}</code><br>
<code>Leap year, summer months: {{leapYearsSummerMonths}}</code><br>
<code>Specific days/months/years: {{specificDaysMonthsYears}}</code><br>
<code>Default value: {{defaultValue}}</code><br>
</p>
<p>

View File

@@ -17,6 +17,7 @@ export class RootPage {
leapYearsSummerMonths = '';
convertedDate = '';
specificDaysMonthsYears = '';
defaultValue: any;
leapYearsArray = [2020, 2016, 2008, 2004, 2000, 1996];
@@ -30,6 +31,16 @@ export class RootPage {
'l\u00f8r'
];
customOptions: any = {
buttons: [{
text: 'Save',
handler: () => console.log('Clicked Save!')
}, {
text: 'Log',
handler: () => console.log('Clicked Log!')
}]
};
onChange(ev: any) {
console.log('Changed', ev);
}

View File

@@ -4,7 +4,7 @@ import { DateTime } from '../datetime';
import { Form } from '../../../util/form';
import { Picker } from '../../picker/picker';
import { PickerController } from '../../picker/picker-controller';
import * as datetime from '../../../util/datetime-util';
import * as datetimeUtil from '../../../util/datetime-util';
import { mockApp, mockConfig, mockElementRef, mockRenderer } from '../../../util/mock-providers';
@@ -491,6 +491,53 @@ describe('DateTime', () => {
});
describe('defaultValue', () => {
it('should default to now if no initial value or bounds supplied', () => {
const now = datetimeUtil.parseDate(new Date().toISOString());
datetime.pickerFormat = 'YYYY-MM-DDThh:mm';
datetime.generate();
var columns = picker.getColumns();
expect(columns[0].options[columns[0].selectedIndex].value).toEqual(now.year);
expect(columns[1].options[columns[1].selectedIndex].value).toEqual(now.month);
expect(columns[2].options[columns[2].selectedIndex].value).toEqual(now.day);
expect(columns[3].options[columns[3].selectedIndex].value).toEqual(now.hour % 12);
expect(columns[4].options[columns[4].selectedIndex].value).toEqual(now.minute);
});
it('should default to max if no initial value supplied but max specified and max before current', () => {
datetime.max = '1987-10-19';
datetime.generate();
var columns = picker.getColumns();
expect(columns[0].options[columns[0].selectedIndex].value).toEqual(10);
expect(columns[1].options[columns[1].selectedIndex].value).toEqual(19);
expect(columns[2].options[columns[2].selectedIndex].value).toEqual(1987);
});
it('should default to current if no initial value supplied but max specified and max after current', () => {
const now = datetimeUtil.parseDate(new Date().toISOString());
datetime.max = '2100-10-19';
datetime.generate();
var columns = picker.getColumns();
expect(columns[0].options[columns[0].selectedIndex].value).toEqual(now.month);
expect(columns[1].options[columns[1].selectedIndex].value).toEqual(now.day);
expect(columns[2].options[columns[2].selectedIndex].value).toEqual(now.year);
});
it('should use pickerDefault if has no value', zoned(() => {
datetime.max = '2100-12-31';
datetime.pickerFormat = 'DD MMMM YYYY';
datetime.initialValue = '2004-08-06';
datetime.generate();
var columns = picker.getColumns();
expect(columns[0].options[columns[0].selectedIndex].value).toEqual(6);
expect(columns[1].options[columns[1].selectedIndex].value).toEqual(8);
expect(columns[2].options[columns[2].selectedIndex].value).toEqual(2004);
}));
});
describe('setValue', () => {
it('should update existing time value with 12-hour PM DateTimeData value', zoned(() => {
@@ -680,10 +727,10 @@ describe('DateTime', () => {
datetime._picker = picker = new Picker(mockApp(), null, mockConfig());
});
console.warn = function(){};
console.warn = function() {};
// pt-br
var customLocale: datetime.LocaleData = {
var customLocale: datetimeUtil.LocaleData = {
dayNames: [
'domingo',
'segunda-feira',

View File

@@ -97,10 +97,16 @@ ion-fab {
@include multi-dir() {
right: $fab-content-margin;
}
@include multi-dir() {
right: calc(#{$fab-content-margin} + constant(safe-area-inset-right));
right: calc(#{$fab-content-margin} + env(safe-area-inset-right));
}
}
&[end] {
@include position-horizontal(null, $fab-content-margin);
@include safe-position-horizontal(null, $fab-content-margin);
}
&[bottom] {
@@ -112,10 +118,16 @@ ion-fab {
@include multi-dir() {
left: $fab-content-margin;
}
@include multi-dir() {
left: calc(#{$fab-content-margin} + constant(safe-area-inset-left));
left: calc(#{$fab-content-margin} + env(safe-area-inset-left));
}
}
&[start] {
@include position-horizontal($fab-content-margin, null);
@include safe-position-horizontal($fab-content-margin, null);
}
&[top][edge] {

View File

@@ -101,6 +101,7 @@ import { Platform } from '../../platform/platform';
'(focus)="onFocus($event)" ' +
'(keydown)="onKeydown($event)" ' +
'[type]="_type" ' +
'dir="auto" ' +
'[attr.aria-labelledby]="_labelId" ' +
'[attr.min]="min" ' +
'[attr.max]="max" ' +
@@ -283,19 +284,24 @@ export class TextInput extends BaseInput<string> implements IonicFormInput {
return;
}
const blurOnScroll = config.getBoolean('hideCaretOnScroll', false);
if (blurOnScroll) {
const hideCaretOnScroll = config.getBoolean('hideCaretOnScroll', false);
if (hideCaretOnScroll) {
this._enableHideCaretOnScroll();
}
const resizeAssist = config.getBoolean('resizeAssist', false);
if (resizeAssist) {
this._keyboardHeight = 60;
this._enableResizeAssist();
const win = _plt.win() as any;
const keyboardPlugin = win.Ionic && win.Ionic.keyboardPlugin;
if (keyboardPlugin) {
const keyboardResizes = config.getBoolean('keyboardResizes', false);
if (keyboardResizes) {
this._keyboardHeight = config.getNumber('keyboardSafeArea', 60);
this._enableScrollMove();
} else {
this._enableScrollPadding();
this._enableScrollMove();
}
} else {
this._useAssist = config.getBoolean('scrollAssist', false);
const usePadding = config.getBoolean('scrollPadding', this._useAssist);
if (usePadding) {
this._enableScrollPadding();
@@ -527,9 +533,8 @@ export class TextInput extends BaseInput<string> implements IonicFormInput {
this.ionFocus.subscribe(() => {
const content = this._content;
// add padding to the bottom of the scroll view (if needed)
content.addScrollPadding(this._getScrollData().scrollPadding);
const scrollPadding = this._getScrollData().scrollPadding;
content.addScrollPadding(scrollPadding);
content.clearScrollPaddingFocusOut();
});
}
@@ -559,13 +564,13 @@ export class TextInput extends BaseInput<string> implements IonicFormInput {
}
}
_enableResizeAssist() {
_enableScrollMove() {
assert(this._content, 'content is undefined');
console.debug('Input: enableAutoScroll');
this.ionFocus.subscribe(() => {
const scrollData = this._getScrollData();
if (Math.abs(scrollData.scrollAmount) > 100) {
if (Math.abs(scrollData.scrollAmount) > 4) {
this._content.scrollTo(0, scrollData.scrollTo, scrollData.scrollDuration);
}
});
@@ -721,7 +726,8 @@ export function getScrollData(
inputOffsetHeight: number,
scrollViewDimensions: ContentDimensions,
keyboardHeight: number,
plaformHeight: number): ScrollData {
plaformHeight: number
): ScrollData {
// compute input's Y values relative to the body
const inputTop = (inputOffsetTop + scrollViewDimensions.contentTop - scrollViewDimensions.scrollTop);
const inputBottom = (inputTop + inputOffsetHeight);
@@ -752,6 +758,15 @@ export function getScrollData(
const scrollData: ScrollData = newScrollData();
// when auto-scrolling, there also needs to be enough
// content padding at the bottom of the scroll view
// always add scroll padding when a text input has focus
// this allows for the content to scroll above of the keyboard
// content behind the keyboard would be blank
// some cases may not need it, but when jumping around it's best
// to have the padding already rendered so there's no jank
scrollData.scrollPadding = keyboardHeight;
if (inputTopWithinSafeArea && inputBottomWithinSafeArea) {
// Input top within safe area, bottom within safe area
// no need to scroll to a position, it's good as-is
@@ -787,15 +802,6 @@ export function getScrollData(
// figure out where it should scroll to for the best position to the input
scrollData.scrollTo = (scrollViewDimensions.scrollTop - scrollData.scrollAmount);
// when auto-scrolling, there also needs to be enough
// content padding at the bottom of the scroll view
// always add scroll padding when a text input has focus
// this allows for the content to scroll above of the keyboard
// content behind the keyboard would be blank
// some cases may not need it, but when jumping around it's best
// to have the padding already rendered so there's no jank
scrollData.scrollPadding = keyboardHeight;
// calculate animation duration
const distance = Math.abs(scrollData.scrollAmount);
const duration = distance / SCROLL_ASSIST_SPEED;

View File

@@ -1,6 +1,6 @@
@import "../../themes/ionic.globals";
$reorder-initial-transform: 160% !default;
$reorder-initial-transform: 300% !default;
// Item reorder
// --------------------------------------------------

View File

@@ -76,6 +76,10 @@ ion-item-options .button {
box-shadow: none;
box-sizing: content-box;
&:last-child {
@include safe-area-padding-horizontal(null, .7em);
}
}
ion-item-options:not([icon-left]) .button:not([icon-only]), // deprecated

View File

@@ -60,6 +60,7 @@ $item-ios-sliding-content-background: $list-ios-background-color !default;
.item-ios {
@include padding-horizontal($item-ios-padding-start, null);
@include safe-area-padding-horizontal($item-ios-padding-start, null);
@include border-radius(0);
position: relative;
@@ -124,6 +125,7 @@ $item-ios-sliding-content-background: $list-ios-background-color !default;
.item-ios.item-block .item-inner {
@include padding-horizontal(null, $item-ios-padding-end / 2);
@include safe-area-padding-horizontal(null, $item-ios-padding-end / 2);
border-bottom: $hairlines-width solid $list-ios-border-color;
}
@@ -219,9 +221,13 @@ $item-ios-sliding-content-background: $list-ios-background-color !default;
.item-ios[detail-push] .item-inner,
button.item-ios:not([detail-none]) .item-inner,
a.item-ios:not([detail-none]) .item-inner {
$safe-area-position: calc(#{$item-ios-padding-end - 2} + constant(safe-area-inset-right));
$safe-area-position-env: calc(#{$item-ios-padding-end - 2} + env(safe-area-inset-right));
@include svg-background-image($item-ios-detail-push-svg, true);
@include padding-horizontal(null, 32px);
@include background-position(end, $item-ios-padding-end - 2, center);
@include background-position(end, $safe-area-position, center);
@include background-position(end, $safe-area-position-env, center);
background-repeat: no-repeat;
background-size: 14px 14px;
@@ -247,6 +253,7 @@ ion-item-group .item-wrapper:last-child .item-ios .item-inner {
.item-divider-ios {
@include padding-horizontal($item-ios-padding-start, null);
@include safe-area-padding-horizontal($item-ios-padding-start, null);
color: $item-ios-divider-color;
background-color: $item-ios-divider-background;

View File

@@ -179,6 +179,7 @@ $list-ios-header-background-color: transparent !default;
.list-header-ios {
@include padding-horizontal($list-ios-header-padding-start, null);
@include safe-area-padding-horizontal($list-ios-header-padding-start, null);
position: relative;

View File

@@ -0,0 +1,22 @@
import { Component } from '@angular/core';
@Component({
template: `
<ion-split-pane>
<ion-tabs>
<ion-tab tabIcon="heart" [root]="tabs1Tab1" tabTitle="Heart"></ion-tab>
<ion-tab tabIcon="star" [root]="tabs1Tab2" tabTitle="Star"></ion-tab>
</ion-tabs>
<ion-tabs>
<ion-tab tabIcon="aperture" [root]="tabs2Tab1" tabTitle="Aperture"></ion-tab>
<ion-tab tabIcon="apps" [root]="tabs2Tab2" tabTitle="Apps"></ion-tab>
</ion-tabs>
</ion-split-pane>
`
})
export class AppComponent {
tabs1Tab1 = 'TabsOneTabOnePageOne';
tabs1Tab2 = 'TabsOneTabTwoPageOne';
tabs2Tab1 = 'TabsTwoTabOnePageOne';
tabs2Tab2 = 'TabsTwoTabTwoPageOne';
}

View File

@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
IonicModule.forRoot(AppComponent, { swipeBackEnabled: true, preloadModules: true }),
],
bootstrap: [IonicApp]
})
export class AppModule {}

View File

@@ -0,0 +1,5 @@
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { TabsOneTabOnePageOne } from './tab-one-page-one';
@NgModule({
imports: [
IonicPageModule.forChild(TabsOneTabOnePageOne)
],
declarations: [
TabsOneTabOnePageOne
]
})
export class TabsOneTabOnePageOneModule { }

View File

@@ -0,0 +1,27 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, } from '../../../../../../..';
@IonicPage({
segment: 'TabsOneTabOnePageOne'
})
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Tabs 1 Tab 1 Page 1</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Tabs 1 Tab 1 Page 1
<button ion-button (click)="nextPage()">Go to Next Page</button>
</ion-content>
`
})
export class TabsOneTabOnePageOne {
constructor(public nav: NavController) {
}
nextPage() {
this.nav.push('TabsOneTabOnePageTwo', { userId: '123', name: 'Andy Bernard'});
}
}

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { TabsOneTabOnePageThree } from './tab-one-page-three';
@NgModule({
imports: [
IonicPageModule.forChild(TabsOneTabOnePageThree)
],
declarations: [
TabsOneTabOnePageThree
]
})
export class TabsOneTabOnePageThreeModule { }

View File

@@ -0,0 +1,33 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from '../../../../../../..';
@IonicPage({
segment: 'TabsOneTabOnePageThree/paramOne/:paramOne/paramTwo/:paramTwo',
defaultHistory: ['TabsOneTabOnePageOne']
})
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Tabs 1 Tab 1 Page 3</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Tabs 1 Tab 1 Page 3
<div>
Param One: {{paramOne}}
</div>
<div>
Name: {{paramTwo}}
</div>
</ion-content>
`
})
export class TabsOneTabOnePageThree {
paramOne: string;
paramTwo: string;
constructor(public nav: NavController, navParams: NavParams) {
this.paramOne = navParams.data.paramOne;
this.paramTwo = navParams.data.paramTwo;
}
}

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { TabsOneTabOnePageTwo } from './tab-one-page-two';
@NgModule({
imports: [
IonicPageModule.forChild(TabsOneTabOnePageTwo)
],
declarations: [
TabsOneTabOnePageTwo
]
})
export class TabsOneTabOnePageTwoModule { }

View File

@@ -0,0 +1,38 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from '../../../../../../..';
@IonicPage({
segment: 'TabsOneTabOnePageTwo/userId/:userId/name/:name',
defaultHistory: ['TabsOneTabOnePageOne']
})
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Tabs 1 Tab 1 Page 2</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Tabs 1 Tab 1 Page 2
<div>
User ID: {{userId}}
</div>
<div>
Name: {{name}}
</div>
<button ion-button (click)="goToNext()">Next</button>
</ion-content>
`
})
export class TabsOneTabOnePageTwo {
userId: string;
name: string;
constructor(public nav: NavController, navParams: NavParams) {
this.userId = navParams.data.userId;
this.name = navParams.data.name;
}
goToNext() {
this.nav.push('TabsOneTabOnePageThree', { paramOne: 'Scranton', paramTwo: 'PA'});
}
}

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { TabsOneTabTwoPageOne } from './tab-two-page-one';
@NgModule({
imports: [
IonicPageModule.forChild(TabsOneTabTwoPageOne)
],
declarations: [
TabsOneTabTwoPageOne
]
})
export class TabsOneTabTwoPageOneModule { }

View File

@@ -0,0 +1,27 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, } from '../../../../../../..';
@IonicPage({
segment: 'TabsOneTabTwoPageOne'
})
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Tabs 1 Tab 2 Page 1</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Tabs 1 Tab 2 Page 1
<button ion-button (click)="nextPage()">Go to Next Page</button>
</ion-content>
`
})
export class TabsOneTabTwoPageOne {
constructor(public nav: NavController) {
}
nextPage() {
this.nav.push('TabsOneTabTwoPageTwo', { userId: '456', name: 'Stanley Hudson'});
}
}

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { TabsOneTabTwoPageThree } from './tab-two-page-three';
@NgModule({
imports: [
IonicPageModule.forChild(TabsOneTabTwoPageThree)
],
declarations: [
TabsOneTabTwoPageThree
]
})
export class TabsOneTabTwoPageThreeModule { }

View File

@@ -0,0 +1,33 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from '../../../../../../..';
@IonicPage({
segment: 'TabsOneTabTwoPageThree/paramOne/:paramOne/paramTwo/:paramTwo',
defaultHistory: ['TabsOneTabTwoPageOne']
})
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Tabs 1 Tab 2 Page 3</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Tabs 1 Tab 2 Page 3
<div>
Param One: {{paramOne}}
</div>
<div>
Param Two: {{paramTwo}}
</div>
</ion-content>
`
})
export class TabsOneTabTwoPageThree {
paramOne: string;
paramTwo: string;
constructor(public nav: NavController, navParams: NavParams) {
this.paramOne = navParams.data.paramOne;
this.paramTwo = navParams.data.paramTwo;
}
}

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { TabsOneTabTwoPageTwo } from './tab-two-page-two';
@NgModule({
imports: [
IonicPageModule.forChild(TabsOneTabTwoPageTwo)
],
declarations: [
TabsOneTabTwoPageTwo
]
})
export class TabsOneTabTwoPageTwoModule { }

View File

@@ -0,0 +1,38 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from '../../../../../../..';
@IonicPage({
segment: 'TabsOneTabTwoPageTwo/userId/:userId/name/:name',
defaultHistory: ['TabsOneTabTwoPageOne']
})
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Tabs 1 Tab 2 Page 2</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Tabs 1 Tab 2 Page 2
<div>
User ID: {{userId}}
</div>
<div>
Name: {{name}}
</div>
<button ion-button (click)="goToNext()">Next</button>
</ion-content>
`
})
export class TabsOneTabTwoPageTwo {
userId: string;
name: string;
constructor(public nav: NavController, navParams: NavParams) {
this.userId = navParams.data.userId;
this.name = navParams.data.name;
}
goToNext() {
this.nav.push('TabsOneTabTwoPageThree', { paramOne: 'Nashua', paramTwo: 'NH'});
}
}

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { TabsTwoTabOnePageOne } from './tab-one-page-one';
@NgModule({
imports: [
IonicPageModule.forChild(TabsTwoTabOnePageOne)
],
declarations: [
TabsTwoTabOnePageOne
]
})
export class TabsTwoTabOnePageOneModule { }

View File

@@ -0,0 +1,27 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, } from '../../../../../../..';
@IonicPage({
segment: 'TabsTwoTabOnePageOne'
})
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Tabs 2 Tab 1 Page 1</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Tabs 2 Tab 1 Page 1
<button ion-button (click)="nextPage()">Go to Next Page</button>
</ion-content>
`
})
export class TabsTwoTabOnePageOne {
constructor(public nav: NavController) {
}
nextPage() {
this.nav.push('TabsTwoTabOnePageTwo', { userId: '234', name: 'Phillis Vance - Vance Refridgeration'});
}
}

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { TabsTwoTabOnePageThree } from './tab-one-page-three';
@NgModule({
imports: [
IonicPageModule.forChild(TabsTwoTabOnePageThree)
],
declarations: [
TabsTwoTabOnePageThree
]
})
export class TabsTwoTabOnePageThreeModule { }

View File

@@ -0,0 +1,33 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from '../../../../../../..';
@IonicPage({
segment: 'TabsTwoTabOnePageThree/paramOne/:paramOne/paramTwo/:paramTwo',
defaultHistory: ['TabsTwoTabOnePageOne']
})
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Tabs 2 Tab 1 Page 3</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Tabs 2 Tab 1 Page 3
<div>
Param One: {{paramOne}}
</div>
<div>
Param Two: {{paramTwo}}
</div>
</ion-content>
`
})
export class TabsTwoTabOnePageThree {
paramOne: string;
paramTwo: string;
constructor(public nav: NavController, navParams: NavParams) {
this.paramOne = navParams.data.paramOne;
this.paramTwo = navParams.data.paramTwo;
}
}

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { TabsTwoTabOnePageTwo } from './tab-one-page-two';
@NgModule({
imports: [
IonicPageModule.forChild(TabsTwoTabOnePageTwo)
],
declarations: [
TabsTwoTabOnePageTwo
]
})
export class TabsTwoTabOnePageTwoModule { }

View File

@@ -0,0 +1,38 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from '../../../../../../..';
@IonicPage({
segment: 'TabsTwoTabOnePageTwo/userId/:userId/name/:name',
defaultHistory: ['TabsTwoTabOnePageOne']
})
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Tabs 2 Tab 1 Page 2</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Tabs 2 Tab 1 Page 2
<div>
User ID: {{userId}}
</div>
<div>
Name: {{name}}
</div>
<button ion-button (click)="goToNext()">Next</button>
</ion-content>
`
})
export class TabsTwoTabOnePageTwo {
userId: string;
name: string;
constructor(public nav: NavController, navParams: NavParams) {
this.userId = navParams.data.userId;
this.name = navParams.data.name;
}
goToNext() {
this.nav.push('TabsTwoTabOnePageThree', { paramOne: 'Stamford', paramTwo: 'CT'});
}
}

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { TabsTwoTabTwoPageOne } from './tab-two-page-one';
@NgModule({
imports: [
IonicPageModule.forChild(TabsTwoTabTwoPageOne)
],
declarations: [
TabsTwoTabTwoPageOne
]
})
export class TabsTwoTabTwoPageOneModule { }

View File

@@ -0,0 +1,27 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, } from '../../../../../../..';
@IonicPage({
segment: 'TabsTwoTabTwoPageOne'
})
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Tabs 2 Tab 2 Page 1</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Tabs 2 Tab 2 Page 1
<button ion-button (click)="nextPage()">Go to Next Page</button>
</ion-content>
`
})
export class TabsTwoTabTwoPageOne {
constructor(public nav: NavController) {
}
nextPage() {
this.nav.push('TabsTwoTabTwoPageTwo', { userId: '456', name: 'Michael Scarn'});
}
}

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { TabsTwoTabTwoPageThree } from './tab-two-page-three';
@NgModule({
imports: [
IonicPageModule.forChild(TabsTwoTabTwoPageThree)
],
declarations: [
TabsTwoTabTwoPageThree
]
})
export class TabsTwoTabTwoPageThreeModule { }

View File

@@ -0,0 +1,33 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from '../../../../../../..';
@IonicPage({
segment: 'TabsTwoTabTwoPageThree/paramOne/:paramOne/paramTwo/:paramTwo',
defaultHistory: ['TabsTwoTabTwoPageOne']
})
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Tabs 2 Tab 2 Page 3</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Tabs 2 Tab 2 Page 3
<div>
Param One: {{paramOne}}
</div>
<div>
Param Two: {{paramTwo}}
</div>
</ion-content>
`
})
export class TabsTwoTabTwoPageThree {
paramOne: string;
paramTwo: string;
constructor(public nav: NavController, navParams: NavParams) {
this.paramOne = navParams.data.paramOne;
this.paramTwo = navParams.data.paramTwo;
}
}

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { TabsTwoTabTwoPageTwo } from './tab-two-page-two';
@NgModule({
imports: [
IonicPageModule.forChild(TabsTwoTabTwoPageTwo)
],
declarations: [
TabsTwoTabTwoPageTwo
]
})
export class TabsTwoTabTwoPageTwoModule { }

View File

@@ -0,0 +1,38 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from '../../../../../../..';
@IonicPage({
segment: 'TabsTwoTabTwoPageTwo/userId/:userId/name/:name',
defaultHistory: ['TabsTwoTabTwoPageOne']
})
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Tabs 2 Tab 2 Page 2</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Tabs 2 Tab 2 Page 2
<div>
User ID: {{userId}}
</div>
<div>
Name: {{name}}
</div>
<button ion-button (click)="next()">Next</button>
</ion-content>
`
})
export class TabsTwoTabTwoPageTwo {
userId: string;
name: string;
constructor(public nav: NavController, navParams: NavParams) {
this.userId = navParams.data.userId;
this.name = navParams.data.name;
}
next() {
this.nav.push('TabsTwoTabTwoPageThree', { paramOne: 'Albany', paramTwo: 'NY'});
}
}

View File

@@ -0,0 +1,8 @@
import { Component } from '@angular/core';
@Component({
template: `<ion-nav [root]="root" name="default"></ion-nav>`
})
export class AppComponent {
root = 'FirstPage';
}

View File

@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
IonicModule.forRoot(AppComponent, { swipeBackEnabled: true, preloadModules: true }),
],
bootstrap: [IonicApp]
})
export class AppModule {}

View File

@@ -0,0 +1,5 @@
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);

View File

@@ -0,0 +1,10 @@
<ion-header>
<ion-navbar>
<ion-title>First Page</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Page One
<button ion-button (click)="goToPageTwo()">Go to Page Two</button>
<a href="#/nav/n4/user/123/name/ted">Using href</a>
</ion-content>

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../..';
import { FirstPage } from './first-page';
@NgModule({
imports: [
IonicPageModule.forChild(FirstPage)
],
declarations: [
FirstPage
]
})
export class FirstPageModule { }

View File

@@ -0,0 +1,15 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, } from '../../../../../..';
@IonicPage()
@Component({
templateUrl: 'first-page.html'
})
export class FirstPage {
constructor(public nav: NavController) {
}
goToPageTwo() {
this.nav.push('SecondPage', { userId: '123', name: 'ted'});
}
}

View File

@@ -0,0 +1,16 @@
<ion-header>
<ion-navbar>
<ion-title>Second Page</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<div>
User ID: {{userId}}
</div>
<div>
Name {{name}}
</div>
<div>
<button ion-button (click)="goToNextPage()">Go to Next Page</button>
</div>
</ion-content>

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../..';
import { SecondPage } from './second-page';
@NgModule({
imports: [
IonicPageModule.forChild(SecondPage)
],
declarations: [
SecondPage
]
})
export class SecondPageModule { }

View File

@@ -0,0 +1,25 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from '../../../../../..';
@IonicPage({
segment: 'user/:userId/name/:name',
defaultHistory: [
'FirstPage'
]
})
@Component({
templateUrl: 'second-page.html'
})
export class SecondPage {
userId: string;
name: string;
constructor(public nav: NavController, public params: NavParams) {
this.userId = this.params.data.userId;
this.name = this.params.data.name;
}
goToNextPage() {
this.nav.push('ThirdPage', { paramOne: 'Hello', paramTwo: 'Its me'});
}
}

View File

@@ -0,0 +1,13 @@
<ion-header>
<ion-navbar>
<ion-title>Third Page</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<div>
Param One: {{paramOne}}
</div>
<div>
Param Two: {{paramTwo}}
</div>
</ion-content>

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../..';
import { ThirdPage } from './third-page';
@NgModule({
imports: [
IonicPageModule.forChild(ThirdPage)
],
declarations: [
ThirdPage
]
})
export class ThirdPageModule { }

View File

@@ -0,0 +1,21 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from '../../../../../..';
@IonicPage({
segment: 'paramOne/:paramOne/paramTwo/:paramTwo',
defaultHistory: [
'FirstPage'
]
})
@Component({
templateUrl: 'third-page.html'
})
export class ThirdPage {
paramOne: string;
paramTwo: string;
constructor(public nav: NavController, public params: NavParams) {
this.paramOne = this.params.data.paramOne;
this.paramTwo = this.params.data.paramTwo;
}
}

View File

@@ -0,0 +1,8 @@
import { Component } from '@angular/core';
@Component({
template: `<ion-nav [root]="root"></ion-nav>`
})
export class AppComponent {
root = 'LoginPage';
}

View File

@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
IonicModule.forRoot(AppComponent, { swipeBackEnabled: true, preloadModules: true }),
],
bootstrap: [IonicApp]
})
export class AppModule {}

View File

@@ -0,0 +1,5 @@
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../..';
import { LoginPage } from './login-page';
@NgModule({
imports: [
IonicPageModule.forChild(LoginPage)
],
declarations: [
LoginPage
]
})
export class LoginPageModule { }

View File

@@ -0,0 +1,24 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, } from '../../../../../..';
@IonicPage()
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Login</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<button ion-button (click)="clickMe()">Login</button>
</ion-content>
`
})
export class LoginPage {
constructor(public nav: NavController) {
}
clickMe() {
this.nav.push('TabsPage');
}
}

View File

@@ -0,0 +1,11 @@
<ion-header>
<ion-navbar>
<ion-title>First Page</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
First Page
<div>
<button ion-button (click)="clickMe()">Go To Next Page</button>
</div>
</ion-content>

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { FirstPage } from './first-page';
@NgModule({
imports: [
IonicPageModule.forChild(FirstPage)
],
declarations: [
FirstPage
]
})
export class FirstPageModule { }

View File

@@ -0,0 +1,15 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, } from '../../../../../../..';
@IonicPage()
@Component({
templateUrl: 'first-page.html'
})
export class FirstPage {
constructor(public nav: NavController) {
}
clickMe() {
this.nav.push('SecondPage', { userId: '123', name: 'Phyllis Vance, Vance Refridgeration'});
}
}

View File

@@ -0,0 +1,14 @@
<ion-header>
<ion-navbar>
<ion-title>Second Page</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<div>
User ID: {{userId}}
</div>
<div>
Name {{name}}
</div>
<button ion-button (click)="goToNextPage()">Next Page</button>
</ion-content>

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { SecondPage } from './second-page';
@NgModule({
imports: [
IonicPageModule.forChild(SecondPage)
],
declarations: [
SecondPage
]
})
export class SecondPageModule { }

View File

@@ -0,0 +1,23 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from '../../../../../../..';
@IonicPage({
segment: 'secondPage/user/:userId/name/:name',
defaultHistory: ['FirstPage']
})
@Component({
templateUrl: 'second-page.html'
})
export class SecondPage {
userId: string;
name: string;
constructor(public nav: NavController, public params: NavParams) {
this.userId = this.params.data.userId;
this.name = this.params.data.name;
}
goToNextPage() {
this.nav.push('ThirdPage', { paramOne: 'Tobey', paramTwo: 'Kevin'});
}
}

View File

@@ -0,0 +1,14 @@
<ion-header>
<ion-navbar>
<ion-title>Third Page</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<h2>Third Page</h2>
<div>
Param One: {{paramOne}}
</div>
<div>
Param Two: {{paramTwo}}
</div>
</ion-content>

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { ThirdPage } from './third-page';
@NgModule({
imports: [
IonicPageModule.forChild(ThirdPage)
],
declarations: [
ThirdPage
]
})
export class ThirdPageModule { }

View File

@@ -0,0 +1,20 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from '../../../../../../..';
@IonicPage({
segment: 'thirdPage/paramOne/:paramOne/paramTwo/:paramTwo',
defaultHistory: ['FirstPage']
})
@Component({
templateUrl: 'third-page.html'
})
export class ThirdPage {
paramOne: string;
paramTwo: string;
constructor(public nav: NavController, public params: NavParams) {
this.paramOne = this.params.data.paramOne;
this.paramTwo = this.params.data.paramTwo;
}
}

View File

@@ -0,0 +1,15 @@
<ion-header>
<ion-navbar>
<ion-title>Fifth Page</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Fifth Page
<div>
User ID: {{userId}}
</div>
<div>
Name {{name}}
</div>
<button ion-button (click)="goToNextPage()">Next Page</button>
</ion-content>

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { FifthPage } from './fifth-page';
@NgModule({
imports: [
IonicPageModule.forChild(FifthPage)
],
declarations: [
FifthPage
]
})
export class FifthPageModule { }

View File

@@ -0,0 +1,23 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from '../../../../../../..';
@IonicPage({
segment: 'fifthPage/user/:userId/name/:name',
defaultHistory: ['FourthPage']
})
@Component({
templateUrl: 'fifth-page.html'
})
export class FifthPage {
userId: string;
name: string;
constructor(public nav: NavController, public params: NavParams) {
this.userId = this.params.data.userId;
this.name = this.params.data.name;
}
goToNextPage() {
this.nav.push('SixthPage', { paramOne: 'Kelly Kapore', paramTwo: 'Creed Bratton'});
}
}

View File

@@ -0,0 +1,11 @@
<ion-header>
<ion-navbar>
<ion-title>Fourth Page</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
Fourth Page
<div>
<button ion-button (click)="clickMe()">Go To Next Page</button>
</div>
</ion-content>

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { FourthPage } from './fourth-page';
@NgModule({
imports: [
IonicPageModule.forChild(FourthPage)
],
declarations: [
FourthPage
]
})
export class FourthPageModule { }

View File

@@ -0,0 +1,15 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, } from '../../../../../../..';
@IonicPage()
@Component({
templateUrl: 'fourth-page.html'
})
export class FourthPage {
constructor(public nav: NavController) {
}
clickMe() {
this.nav.push('FifthPage', { userId: '456', name: 'Ryan Howard'});
}
}

View File

@@ -0,0 +1,14 @@
<ion-header>
<ion-navbar>
<ion-title>Sixth Page</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<h2>Sixth Page</h2>
<div>
Param One: {{paramOne}}
</div>
<div>
Param Two: {{paramTwo}}
</div>
</ion-content>

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../../..';
import { SixthPage } from './sixth-page';
@NgModule({
imports: [
IonicPageModule.forChild(SixthPage)
],
declarations: [
SixthPage
]
})
export class SixthPageModule { }

View File

@@ -0,0 +1,20 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from '../../../../../../..';
@IonicPage({
segment: 'sixthPage/paramOne/:paramOne/paramTwo/:paramTwo',
defaultHistory: ['FourthPage']
})
@Component({
templateUrl: 'sixth-page.html'
})
export class SixthPage {
paramOne: string;
paramTwo: string;
constructor(public nav: NavController, public params: NavParams) {
this.paramOne = this.params.data.paramOne;
this.paramTwo = this.params.data.paramTwo;
}
}

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../..';
import { TabsPage } from './tabs-page';
@NgModule({
imports: [
IonicPageModule.forChild(TabsPage)
],
declarations: [
TabsPage
]
})
export class TabsPageModule { }

Some files were not shown because too many files have changed in this diff Show More