mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Compare commits
333 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
120c85d74e | ||
|
|
cbe0b42e74 | ||
|
|
4b60e89849 | ||
|
|
f893aa6774 | ||
|
|
5a895bb099 | ||
|
|
5fbca0ef7c | ||
|
|
51ced8bec2 | ||
|
|
26c653e43e | ||
|
|
6d11499417 | ||
|
|
df8d1cc389 | ||
|
|
8baa6474a4 | ||
|
|
88e5642f60 | ||
|
|
325cc5eea7 | ||
|
|
1d435bfd95 | ||
|
|
5d562166fc | ||
|
|
3b4b29e832 | ||
|
|
7f7c3cd514 | ||
|
|
de19dbe81b | ||
|
|
299a68bcdc | ||
|
|
646d736d07 | ||
|
|
7aa07b05ee | ||
|
|
877829b933 | ||
|
|
abf6bd1f68 | ||
|
|
d350ddc175 | ||
|
|
27a70fbdd8 | ||
|
|
59dd853f54 | ||
|
|
19020108aa | ||
|
|
04120b4719 | ||
|
|
424b15aefd | ||
|
|
6b42677460 | ||
|
|
272893278d | ||
|
|
e66c54958b | ||
|
|
6add05e31a | ||
|
|
b96e31bf30 | ||
|
|
d701799d8b | ||
|
|
a04b577f1d | ||
|
|
2afc5cfeda | ||
|
|
45e71a67b5 | ||
|
|
ed66591db6 | ||
|
|
19a3b6616e | ||
|
|
bc4a1cab66 | ||
|
|
665e44f633 | ||
|
|
588fad879f | ||
|
|
20b7ab7c57 | ||
|
|
ec2a34db6e | ||
|
|
ee3d943116 | ||
|
|
aff2f08f9a | ||
|
|
539901da83 | ||
|
|
7eb2f0b343 | ||
|
|
239b559e6e | ||
|
|
6677d80343 | ||
|
|
4c8efc22e1 | ||
|
|
b11442716b | ||
|
|
991cadbe85 | ||
|
|
af394b5ef6 | ||
|
|
505d27ad34 | ||
|
|
d24c4f45fb | ||
|
|
9264a04343 | ||
|
|
c0276d5350 | ||
|
|
ee6c48102d | ||
|
|
1331ce2499 | ||
|
|
11a1c70c00 | ||
|
|
ba44780df0 | ||
|
|
3b32b8e648 | ||
|
|
7bcf5a05f7 | ||
|
|
67af71bd9b | ||
|
|
78d427dfcf | ||
|
|
2357bb4749 | ||
|
|
e31a4da9ce | ||
|
|
0ec71cd188 | ||
|
|
cc1eb02337 | ||
|
|
53113366e2 | ||
|
|
51d507998c | ||
|
|
f26c4b4feb | ||
|
|
873ea5f074 | ||
|
|
59eb9a328d | ||
|
|
83509db55f | ||
|
|
42709848db | ||
|
|
8605672888 | ||
|
|
9732883165 | ||
|
|
4525f7526c | ||
|
|
a23d59c41d | ||
|
|
95c06a53cc | ||
|
|
a5a85def5a | ||
|
|
afc9b36c5d | ||
|
|
fd3c6baec7 | ||
|
|
27cb360eac | ||
|
|
356ccd9e1c | ||
|
|
1bf1a61864 | ||
|
|
ff467db339 | ||
|
|
f88823a30f | ||
|
|
5776f76ac9 | ||
|
|
c7beb8c7ab | ||
|
|
bfa2362882 | ||
|
|
36e71c6868 | ||
|
|
b3d68c95c5 | ||
|
|
745d808728 | ||
|
|
314f7e5e1e | ||
|
|
7d0f9f58e6 | ||
|
|
c0df862398 | ||
|
|
e423e082b6 | ||
|
|
786de79ad9 | ||
|
|
ea6450e96a | ||
|
|
feeb2678a9 | ||
|
|
cf24057183 | ||
|
|
f9012e18bb | ||
|
|
dd0b29388e | ||
|
|
6cd719f023 | ||
|
|
d9ac950f17 | ||
|
|
65c250be95 | ||
|
|
bc9accf215 | ||
|
|
cb5707d467 | ||
|
|
35f394750f | ||
|
|
4fa17a2f59 | ||
|
|
902f5f7c1f | ||
|
|
3c8edba0f5 | ||
|
|
47f9ab3663 | ||
|
|
614925d1db | ||
|
|
93d1d02613 | ||
|
|
bda624f870 | ||
|
|
c792ab69ae | ||
|
|
17c0543a39 | ||
|
|
ea8213b39a | ||
|
|
a09c6c374b | ||
|
|
a900c4e508 | ||
|
|
0e4c1b726a | ||
|
|
df269bf7fb | ||
|
|
5cb51efb55 | ||
|
|
b07eb1afad | ||
|
|
b0dc856b1b | ||
|
|
8e438634a2 | ||
|
|
38277a0087 | ||
|
|
054f43a67b | ||
|
|
385e6cf189 | ||
|
|
6b92a5a8c2 | ||
|
|
59f9737d9b | ||
|
|
0967b63a51 | ||
|
|
db37072c40 | ||
|
|
9316f73b81 | ||
|
|
55dfd254e5 | ||
|
|
0a97cf2d5f | ||
|
|
94a33a74d2 | ||
|
|
b4c6cea760 | ||
|
|
0b440edc51 | ||
|
|
e10f9b1a06 | ||
|
|
8586cc11ed | ||
|
|
33be36d070 | ||
|
|
a0554573de | ||
|
|
fa7ea0c617 | ||
|
|
c72598a810 | ||
|
|
4ac8ffb6ed | ||
|
|
979ca63a6a | ||
|
|
57f3f9742b | ||
|
|
74f90e6d57 | ||
|
|
44f36c4509 | ||
|
|
eb468d2530 | ||
|
|
156b982510 | ||
|
|
84e84d3280 | ||
|
|
8eef99d82f | ||
|
|
404d977c81 | ||
|
|
682ce49592 | ||
|
|
0cd9a373e7 | ||
|
|
41e34fc4ce | ||
|
|
d9a7652912 | ||
|
|
515de26a8b | ||
|
|
c9851442c6 | ||
|
|
47e1cdce9d | ||
|
|
6360d41f6a | ||
|
|
c19615ed11 | ||
|
|
b5c7ab2e98 | ||
|
|
3d569eb88a | ||
|
|
9be5751eeb | ||
|
|
9a4d81b329 | ||
|
|
54acc74fdb | ||
|
|
3819740998 | ||
|
|
e8ba41aac2 | ||
|
|
43de89f096 | ||
|
|
9fd231a04c | ||
|
|
ccc3696b9a | ||
|
|
36b7d338f6 | ||
|
|
5974dcea9e | ||
|
|
9e4a5cb496 | ||
|
|
d403638d71 | ||
|
|
93cfa17638 | ||
|
|
7272b5a42a | ||
|
|
7cee7b0eaf | ||
|
|
f20dda9da7 | ||
|
|
ccb49f36d6 | ||
|
|
8ac2ff485a | ||
|
|
63fd63e72e | ||
|
|
a252a94136 | ||
|
|
19c36deea3 | ||
|
|
2827275da6 | ||
|
|
58b57c0ca7 | ||
|
|
a3ead3d7c8 | ||
|
|
c78e0d21ec | ||
|
|
af6b54cda6 | ||
|
|
d04650c130 | ||
|
|
4e4e06898a | ||
|
|
4fbcda7440 | ||
|
|
e07aad460d | ||
|
|
d3e6b36a28 | ||
|
|
4b9f673594 | ||
|
|
09b01baa4e | ||
|
|
a63f760786 | ||
|
|
e0b09615bd | ||
|
|
f88f588d2d | ||
|
|
99142f8ebe | ||
|
|
02f8f11e74 | ||
|
|
daab927fbd | ||
|
|
945cd8ff52 | ||
|
|
e1617c1433 | ||
|
|
a2a77f06d1 | ||
|
|
042f698555 | ||
|
|
5c612aa33e | ||
|
|
b56b0e8105 | ||
|
|
0ccd96e8b5 | ||
|
|
af16846568 | ||
|
|
d5ba56f144 | ||
|
|
67ddafca25 | ||
|
|
b10ec68087 | ||
|
|
52081a471a | ||
|
|
5c2aa2adaf | ||
|
|
fbed3c5b04 | ||
|
|
da8ce042b6 | ||
|
|
960e529b43 | ||
|
|
ae56039ba1 | ||
|
|
fa24e4052a | ||
|
|
546003037e | ||
|
|
25dd7b5fce | ||
|
|
f7bcc4603c | ||
|
|
06b388bb68 | ||
|
|
305848274d | ||
|
|
ddcd3cf1c5 | ||
|
|
5d668036e6 | ||
|
|
d93ca82666 | ||
|
|
0ae638a6a0 | ||
|
|
e5f7812798 | ||
|
|
06246df3ce | ||
|
|
396f891f33 | ||
|
|
4354fc212e | ||
|
|
ddb8ef23e0 | ||
|
|
0964c850d4 | ||
|
|
3118bbbd1b | ||
|
|
f84d38346e | ||
|
|
eaadea7569 | ||
|
|
c90fcb07e7 | ||
|
|
a7ea189fa3 | ||
|
|
c7ad3ce4bf | ||
|
|
7dfe061a7c | ||
|
|
8c75c214d7 | ||
|
|
5a4f8b9b5d | ||
|
|
f43444bf51 | ||
|
|
37c198414d | ||
|
|
5d178534c2 | ||
|
|
4852b4a3a4 | ||
|
|
d25943f27f | ||
|
|
bdbd521b13 | ||
|
|
759fe607c8 | ||
|
|
17359b7b8c | ||
|
|
c6343951ae | ||
|
|
e8f6e0134e | ||
|
|
a1a762c0e6 | ||
|
|
999f33a5b9 | ||
|
|
7c713e1a62 | ||
|
|
5b91317d39 | ||
|
|
6d8490e393 | ||
|
|
2143f7198e | ||
|
|
f2894be061 | ||
|
|
1105bcda86 | ||
|
|
33f2f09c5e | ||
|
|
a2e469d408 | ||
|
|
656ea66632 | ||
|
|
7b5bb940c9 | ||
|
|
8674aaf419 | ||
|
|
ced9bd2bb8 | ||
|
|
3dfaa4c019 | ||
|
|
1fc1305dd5 | ||
|
|
90f9650d7a | ||
|
|
00d128f87f | ||
|
|
040981f585 | ||
|
|
b47848ceb2 | ||
|
|
3e70856c0b | ||
|
|
b7df0d8efb | ||
|
|
b12186bad1 | ||
|
|
3ebc3656c1 | ||
|
|
3b43a872a6 | ||
|
|
25f942e70f | ||
|
|
a43386a405 | ||
|
|
552a88c73b | ||
|
|
3c4ed81845 | ||
|
|
73b7a00771 | ||
|
|
19ec0caebb | ||
|
|
719f6b194e | ||
|
|
beabe32cf5 | ||
|
|
1dede2305f | ||
|
|
145fcd24f2 | ||
|
|
ca55907e46 | ||
|
|
15eaad6044 | ||
|
|
72c2b623e5 | ||
|
|
96657535f1 | ||
|
|
e40590d68c | ||
|
|
56e36c0754 | ||
|
|
49723c3b81 | ||
|
|
5364d00671 | ||
|
|
9f71fde276 | ||
|
|
a26b054a3f | ||
|
|
d5149313e6 | ||
|
|
2ef6d0ca75 | ||
|
|
7880d44c07 | ||
|
|
ed2e76b607 | ||
|
|
07ffddca9a | ||
|
|
51f4c19d77 | ||
|
|
1786f1b897 | ||
|
|
e001967fa8 | ||
|
|
68f3c6c0c8 | ||
|
|
d896682799 | ||
|
|
7ad8d47aea | ||
|
|
5b299a000f | ||
|
|
b0986f5d6d | ||
|
|
ece5047b6c | ||
|
|
a7ce20f990 | ||
|
|
caf2f55a77 | ||
|
|
4495663cea | ||
|
|
5c61cb23ac | ||
|
|
6d787553a3 | ||
|
|
702330478c | ||
|
|
42a0c7fa61 | ||
|
|
c144580a49 | ||
|
|
be79382386 | ||
|
|
0d32e5e791 | ||
|
|
0fdff89b67 | ||
|
|
7281f020f4 |
4
.github/CONTRIBUTING.md
vendored
4
.github/CONTRIBUTING.md
vendored
@@ -14,9 +14,9 @@ Please see our [Contributor Code of Conduct](https://github.com/driftyco/ionic/b
|
||||
|
||||
* It is required that you clearly describe the steps necessary to reproduce the issue you are running into. Although we would love to help our users as much as possible, diagnosing issues without clear reproduction steps is extremely time-consuming and simply not sustainable.
|
||||
|
||||
* The issue list of this repo is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately.
|
||||
* The issue list of this repository is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately.
|
||||
|
||||
* Issues with no clear repro steps will not be triaged. If an issue labeled "need reply" receives no further input from the issue author for more than 5 days, it will be closed.
|
||||
* Issues with no clear steps to reproduce will not be triaged. If an issue is labeled with "needs reply" and receives no further replies from the author of the issue for more than 5 days, it will be closed.
|
||||
|
||||
* If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported](https://github.com/driftyco/ionic/issues?utf8=%E2%9C%93&q=is%3Aissue). You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
|
||||
|
||||
|
||||
1
.github/ISSUE_TEMPLATE.md
vendored
1
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,6 +1,7 @@
|
||||
**Ionic version:** (check one with "x")
|
||||
[ ] **1.x**
|
||||
[ ] **2.x**
|
||||
[ ] **3.x**
|
||||
|
||||
**I'm submitting a ...** (check one with "x")
|
||||
[ ] bug report
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -7,6 +7,6 @@
|
||||
-
|
||||
-
|
||||
|
||||
**Ionic Version**: 1.x / 2.x
|
||||
**Ionic Version**: 1.x / 2.x / 3.x
|
||||
|
||||
**Fixes**: #
|
||||
|
||||
304
CHANGELOG.md
304
CHANGELOG.md
@@ -1,3 +1,307 @@
|
||||
<a name="3.1.1"></a>
|
||||
## [3.1.1](https://github.com/driftyco/ionic/compare/v3.1.0...v3.1.1) (2017-04-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **datetime:** return the correct value ([af394b5](https://github.com/driftyco/ionic/commit/af394b5))
|
||||
* **datetime:** always returns a string ([6677d80](https://github.com/driftyco/ionic/commit/6677d80))
|
||||
* **input:** don't dispatch first ngModel update ([505d27a](https://github.com/driftyco/ionic/commit/505d27a))
|
||||
* **input:** initialize in ngAfterContentInit ([239b559](https://github.com/driftyco/ionic/commit/239b559))
|
||||
* **menu:** missing output events in interface ([7eb2f0b](https://github.com/driftyco/ionic/commit/7eb2f0b)), closes [#11383](https://github.com/driftyco/ionic/issues/11383)
|
||||
* **range:** fix label reference ([ee6c481](https://github.com/driftyco/ionic/commit/ee6c481))
|
||||
* **searchbar:** add setFocus() back ([9264a04](https://github.com/driftyco/ionic/commit/9264a04)), closes [#11397](https://github.com/driftyco/ionic/issues/11397)
|
||||
* **select:** use correct assert condition ([ec2a34d](https://github.com/driftyco/ionic/commit/ec2a34d))
|
||||
* **select:** return the value in ionChange instead of this ([d24c4f4](https://github.com/driftyco/ionic/commit/d24c4f4))
|
||||
* **select:** allow object as value ([4c8efc2](https://github.com/driftyco/ionic/commit/4c8efc2))
|
||||
* **select:** remove private reference ([c0276d5](https://github.com/driftyco/ionic/commit/c0276d5))
|
||||
* **toggle:** initialize in ngAfterContentInit ([539901d](https://github.com/driftyco/ionic/commit/539901d))
|
||||
|
||||
|
||||
|
||||
<a name="3.1.0"></a>
|
||||
# [3.1.0](https://github.com/driftyco/ionic/compare/v3.0.1...v3.1.0) (2017-04-26)
|
||||
|
||||
|
||||
### Steps to Upgrade
|
||||
|
||||
Update your package.json to match the following dependencies, remove the existing `node_modules` directory, and then run `npm install`:
|
||||
|
||||
```
|
||||
"dependencies": {
|
||||
"@angular/common": "4.0.2",
|
||||
"@angular/compiler": "4.0.2",
|
||||
"@angular/compiler-cli": "4.0.2",
|
||||
"@angular/core": "4.0.2",
|
||||
"@angular/forms": "4.0.2",
|
||||
"@angular/http": "4.0.2",
|
||||
"@angular/platform-browser": "4.0.2",
|
||||
"@angular/platform-browser-dynamic": "4.0.2",
|
||||
"@ionic-native/core": "3.4.2",
|
||||
"@ionic-native/splash-screen": "3.4.2",
|
||||
"@ionic-native/status-bar": "3.4.2",
|
||||
"@ionic/storage": "2.0.1",
|
||||
"ionic-angular": "3.1.1",
|
||||
"ionicons": "3.0.0",
|
||||
"rxjs": "5.1.1",
|
||||
"sw-toolbox": "3.4.0",
|
||||
"zone.js": "^0.8.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ionic/app-scripts": "1.3.4",
|
||||
"typescript": "~2.2.1"
|
||||
},
|
||||
```
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **input:** trigger inputUpdated on initialize ([5776f76](https://github.com/driftyco/ionic/commit/5776f76))
|
||||
* **input:** make sure isDisabled gets set to a boolean ([bfa2362](https://github.com/driftyco/ionic/commit/bfa2362))
|
||||
* **item-options:** rtl support ([#11188](https://github.com/driftyco/ionic/issues/11188)) ([ea6450e](https://github.com/driftyco/ionic/commit/ea6450e))
|
||||
* **menu:** rtl support ([5311336](https://github.com/driftyco/ionic/commit/5311336))
|
||||
* **menu:** rtl support ([51d5079](https://github.com/driftyco/ionic/commit/51d5079))
|
||||
* **nav-controller:** print exceptions inside lifecycle events ([95c06a5](https://github.com/driftyco/ionic/commit/95c06a5)), closes [#10974](https://github.com/driftyco/ionic/issues/10974)
|
||||
* **nav-controller:** filter null view-controllers ([8605672](https://github.com/driftyco/ionic/commit/8605672))
|
||||
* **nav-controller:** queue lazy loading ([f88823a](https://github.com/driftyco/ionic/commit/f88823a))
|
||||
* **nav-controller:** fix crash when it is destroyed ([cc1eb02](https://github.com/driftyco/ionic/commit/cc1eb02)), closes [#11338](https://github.com/driftyco/ionic/issues/11338)
|
||||
* **navigation:** legacy deeplink config can have a defaultHistory entry that is a component ([35f3947](https://github.com/driftyco/ionic/commit/35f3947))
|
||||
* **platform:** resize events are dispatched inside zone ([83509db](https://github.com/driftyco/ionic/commit/83509db))
|
||||
* **scroll:** fix memory leak ([3c8edba](https://github.com/driftyco/ionic/commit/3c8edba))
|
||||
* **searchbar:** debounce input for ionInput ([11a1c70](https://github.com/driftyco/ionic/commit/11a1c70))
|
||||
* **select:** stores string | string[] ([ba44780](https://github.com/driftyco/ionic/commit/ba44780)), closes [#11337](https://github.com/driftyco/ionic/issues/11337)
|
||||
* **slides:** fix fast rerendering crash ([#11100](https://github.com/driftyco/ionic/issues/11100)) ([78d427d](https://github.com/driftyco/ionic/commit/78d427d)), closes [#10830](https://github.com/driftyco/ionic/issues/10830)
|
||||
* **sliding-gesture:** add missing return value ([3b32b8e](https://github.com/driftyco/ionic/commit/3b32b8e))
|
||||
* **tabs:** invalid component comparison ([#11084](https://github.com/driftyco/ionic/issues/11084)) ([e423e08](https://github.com/driftyco/ionic/commit/e423e08))
|
||||
* **toggle:** use correct toggle background color for iOS colors ([b3d68c9](https://github.com/driftyco/ionic/commit/b3d68c9))
|
||||
* **util:** pass an option to default to right side in isRightSide ([7bcf5a0](https://github.com/driftyco/ionic/commit/7bcf5a0))
|
||||
* **virtual-scroll:** create views inside zone ([fd3c6ba](https://github.com/driftyco/ionic/commit/fd3c6ba)), closes [#10451](https://github.com/driftyco/ionic/issues/10451)
|
||||
* **virtual-scroll:** supports null records ([67af71b](https://github.com/driftyco/ionic/commit/67af71b))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **app:** add pull-left/right/start/end ([#11214](https://github.com/driftyco/ionic/issues/11214)) ([d9ac950](https://github.com/driftyco/ionic/commit/d9ac950))
|
||||
* **app:** add text-start and text-end ([#11213](https://github.com/driftyco/ionic/issues/11213)) ([6cd719f](https://github.com/driftyco/ionic/commit/6cd719f))
|
||||
* **app:** add responsive utility attributes by screen size ([#11228](https://github.com/driftyco/ionic/issues/11228)) ([cf24057](https://github.com/driftyco/ionic/commit/cf24057)), closes [#10567](https://github.com/driftyco/ionic/issues/10567)
|
||||
* **item:** add sass variable to override avatar border radius ([b0dc856](https://github.com/driftyco/ionic/commit/b0dc856)), closes [#10763](https://github.com/driftyco/ionic/issues/10763)
|
||||
* **label:** fix positioning of floating label for rtl ([#11324](https://github.com/driftyco/ionic/issues/11324)) ([0ec71cd](https://github.com/driftyco/ionic/commit/0ec71cd))
|
||||
* **list:** rtl support for list-header ([#11328](https://github.com/driftyco/ionic/issues/11328)) ([e31a4da](https://github.com/driftyco/ionic/commit/e31a4da))
|
||||
* **modal:** add cssClass to modal options ([5cb51ef](https://github.com/driftyco/ionic/commit/5cb51ef)), closes [#10020](https://github.com/driftyco/ionic/issues/10020)
|
||||
* **platform:** add electron as a platform ([#10868](https://github.com/driftyco/ionic/issues/10868)) ([c0df862](https://github.com/driftyco/ionic/commit/c0df862))
|
||||
* **rtl:** add start and end text-align for alert and picker ([cb5707d](https://github.com/driftyco/ionic/commit/cb5707d))
|
||||
* **segment:** add segment rtl support ([#11215](https://github.com/driftyco/ionic/issues/11215)) ([dd0b293](https://github.com/driftyco/ionic/commit/dd0b293))
|
||||
* **select:** add popover interface as an option ([745d808](https://github.com/driftyco/ionic/commit/745d808))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **toggle:** css containment ([93d1d02](https://github.com/driftyco/ionic/commit/93d1d02))
|
||||
* **toggle:** events are not zoned ([bda624f](https://github.com/driftyco/ionic/commit/bda624f))
|
||||
* **toggle:** toggle's button is not activated ([17c0543](https://github.com/driftyco/ionic/commit/17c0543))
|
||||
|
||||
|
||||
|
||||
<a name="3.0.1"></a>
|
||||
## [3.0.1](https://github.com/driftyco/ionic/compare/v3.0.0...v3.0.1) (2017-04-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **scroll:** fix scroll issues in UIWebView ([26d10c4](https://github.com/driftyco/ionic/commit/26d10c4)), closes [#11081](https://github.com/driftyco/ionic/issues/11081) [#10976](https://github.com/driftyco/ionic/issues/10976) [#10966](https://github.com/driftyco/ionic/issues/10966) [#10936](https://github.com/driftyco/ionic/issues/10936) [#11051](https://github.com/driftyco/ionic/issues/11051) [#10889](https://github.com/driftyco/ionic/issues/10889)
|
||||
* **tap-click:** remove 300ms click delay ([36bbcd9](https://github.com/driftyco/ionic/commit/36bbcd9))
|
||||
* **virtual-list:** make it work with empty lists ([eb9de60](https://github.com/driftyco/ionic/commit/eb9de60)), closes [#11093](https://github.com/driftyco/ionic/issues/11093)
|
||||
|
||||
|
||||
|
||||
<a name="3.0.0"></a>
|
||||
# [3.0.0](https://github.com/driftyco/ionic/compare/v2.3.0...v3.0.0) (2017-04-05)
|
||||
|
||||
|
||||
### Steps to Upgrade to 3.0
|
||||
|
||||
With this release comes a major update to Angular (Angular 4.0!), the latest version of TypeScript, and some optional structural changes to your application.
|
||||
|
||||
1. Update your package.json to match the following dependencies, remove the existing `node_modules` directory, and then run `npm install`:
|
||||
|
||||
```
|
||||
"dependencies": {
|
||||
"@angular/common": "4.0.0",
|
||||
"@angular/compiler": "4.0.0",
|
||||
"@angular/compiler-cli": "4.0.0",
|
||||
"@angular/core": "4.0.0",
|
||||
"@angular/forms": "4.0.0",
|
||||
"@angular/http": "4.0.0",
|
||||
"@angular/platform-browser": "4.0.0",
|
||||
"@angular/platform-browser-dynamic": "4.0.0",
|
||||
"@ionic-native/core": "3.4.2",
|
||||
"@ionic-native/splash-screen": "3.4.2",
|
||||
"@ionic-native/status-bar": "3.4.2",
|
||||
"@ionic/storage": "2.0.1",
|
||||
"ionic-angular": "3.0.1",
|
||||
"ionicons": "3.0.0",
|
||||
"rxjs": "5.1.1",
|
||||
"sw-toolbox": "3.4.0",
|
||||
"zone.js": "^0.8.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ionic/app-scripts": "1.3.0",
|
||||
"typescript": "~2.2.1"
|
||||
}
|
||||
```
|
||||
|
||||
2. Import the `BrowserModule` in your `app/app.module.ts` file:
|
||||
|
||||
```
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
```
|
||||
|
||||
and then add it to the imports in the same file:
|
||||
|
||||
```
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(MyApp)
|
||||
],
|
||||
```
|
||||
|
||||
3. If you are using `Http`, import the `HttpModule` in your `app/app.module.ts` file:
|
||||
|
||||
```
|
||||
import { HttpModule } from '@angular/http';
|
||||
```
|
||||
|
||||
and then add it to the imports in the same file:
|
||||
|
||||
```
|
||||
imports: [
|
||||
BrowserModule,
|
||||
HttpModule,
|
||||
IonicModule.forRoot(MyApp)
|
||||
],
|
||||
```
|
||||
|
||||
4. Upgrading to Ionic Native 3.x will result in a smaller bundle size. With Ionic Native 3, native functionality was moved from static methods to using Angular injectables.
|
||||
- Blog Post: http://blog.ionic.io/ionic-native-3-x/
|
||||
- Example Upgrade Commit: https://github.com/driftyco/ionic-conference-app/commit/62088
|
||||
|
||||
And that’s it! Your app should still function the same without any issues.
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **alert:** add missing cssClass property for buttons ([4fbcda7](https://github.com/driftyco/ionic/commit/4fbcda7))
|
||||
* **content:** remove scroll bouncing from desktop ([7cee7b0](https://github.com/driftyco/ionic/commit/7cee7b0))
|
||||
* **content:** enable scroll listener automatically ([d9a7652](https://github.com/driftyco/ionic/commit/d9a7652)), closes [#10938](https://github.com/driftyco/ionic/issues/10938)
|
||||
* **datetime:** emit ionCancel event on backdrop click ([#10532](https://github.com/driftyco/ionic/issues/10532)) ([4ac8ffb](https://github.com/driftyco/ionic/commit/4ac8ffb))
|
||||
* **datetime:** remove unnecessary calls and performance improvements ([99142f8](https://github.com/driftyco/ionic/commit/99142f8))
|
||||
* **infinite-scroll:** don't call `complete` if the state isn't loading ([58b57c0](https://github.com/driftyco/ionic/commit/58b57c0))
|
||||
* **item-sliding:** add forwardRef for item options ([0ccd96e](https://github.com/driftyco/ionic/commit/0ccd96e))
|
||||
* **navigation:** update the URL if there are no children navs ([8586cc1](https://github.com/driftyco/ionic/commit/8586cc1))
|
||||
* **slides:** negative number indicates position starting at end ([#10997](https://github.com/driftyco/ionic/issues/10997)) ([33be36d](https://github.com/driftyco/ionic/commit/33be36d))
|
||||
* **split-pane:** add RTL support ([57f3f97](https://github.com/driftyco/ionic/commit/57f3f97)), closes [#10903](https://github.com/driftyco/ionic/issues/10903)
|
||||
* **virtual-list:** fix the rendering of the first item ([ccb49f3](https://github.com/driftyco/ionic/commit/ccb49f3))
|
||||
* **virtual-list:** update compatibility with angular ([682ce49](https://github.com/driftyco/ionic/commit/682ce49))
|
||||
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
* **grid:** remove the old grid system ([19c36de](https://github.com/driftyco/ionic/commit/19c36de))
|
||||
* **typography:** remove the native element selectors ([2827275](https://github.com/driftyco/ionic/commit/2827275))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **module-loader:** add caching for ngModuleLoader on load ([17359b7](https://github.com/driftyco/ionic/commit/17359b7))
|
||||
* **module-loader:** add preloadModules config option, set to false ([bdbd521](https://github.com/driftyco/ionic/commit/bdbd521))
|
||||
* **module-loader:** preload modules based on priority ([5a4f8b9](https://github.com/driftyco/ionic/commit/5a4f8b9))
|
||||
* **module-loader:** run outside of angular and in requestIdleCallback ([c7ad3ce](https://github.com/driftyco/ionic/commit/c7ad3ce))
|
||||
* **navigation:** [@DeepLink](https://github.com/DeepLink) decorator ([3e70856](https://github.com/driftyco/ionic/commit/3e70856))
|
||||
* **navigation:** add optional priority to deep link config ([b47848c](https://github.com/driftyco/ionic/commit/b47848c))
|
||||
* **split-pane:** adds enabled input ([fa7ea0c](https://github.com/driftyco/ionic/commit/fa7ea0c)), closes [#10949](https://github.com/driftyco/ionic/issues/10949)
|
||||
* **split-pane:** sizing via scss variables ([979ca63](https://github.com/driftyco/ionic/commit/979ca63)), closes [#10893](https://github.com/driftyco/ionic/issues/10893)
|
||||
* **util:** system.js ng-module loader ([beabe32](https://github.com/driftyco/ionic/commit/beabe32))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
#### Grid
|
||||
|
||||
Removed the deprecated (old) grid. See the blog post for more information including steps to migrate:
|
||||
http://blog.ionic.io/build-awesome-desktop-apps-with-ionics-new-responsive-grid/
|
||||
|
||||
#### Typography
|
||||
|
||||
The following selectors to style the text color of the native text elements have been removed:
|
||||
|
||||
```
|
||||
h1[color], h2[color], h3[color], h4[color], h5[color], h6[color], a[color]:not([ion-button]):not([ion-item]):not([ion-fab]), p[color], span[color], b[color], i[color], strong[color], em[color], small[color], sub[color], sup[color]
|
||||
```
|
||||
|
||||
These have been throwing a deprecation warning since rc.3 but still working. They are officially gone and therefore these elements will not get the color unless the `ion-text` attribute is added. Please see the documentation for more information: http://ionicframework.com/docs/api/components/typography/Typography/
|
||||
|
||||
#### Slides
|
||||
|
||||
The following properties and functions have been printing console warnings and are officially removed:
|
||||
|
||||
Slides input `options` has been removed. Please use the input
|
||||
properties instead.
|
||||
|
||||
Slide event `ionWillChange` has been removed, please use
|
||||
`ionSlideWillChange` instead.
|
||||
|
||||
Slide event `ionDidChange` has been removed, please use
|
||||
`ionSlideDidChange` instead.
|
||||
|
||||
Slide event `ionDrag` has been removed, please use `ionSlideDrag`
|
||||
instead.
|
||||
|
||||
Slides `getSlider()` method has been removed, please use the instance
|
||||
of ion-slides.
|
||||
|
||||
|
||||
<a name="2.3.0"></a>
|
||||
# [2.3.0](https://github.com/driftyco/ionic/compare/v2.2.0...v2.3.0) (2017-03-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **alert:** pass id to alert inputs ([46fe1ff](https://github.com/driftyco/ionic/commit/46fe1ff)), closes [#10603](https://github.com/driftyco/ionic/issues/10603)
|
||||
* **datetime:** don't always disable day values when dayValues is set ([eff420f](https://github.com/driftyco/ionic/commit/eff420f))
|
||||
* **datetime:** move the call to picker.refresh() in generate ([58beea3](https://github.com/driftyco/ionic/commit/58beea3))
|
||||
* **datetime:** respect time limits in hours and minutes ([afd99ba](https://github.com/driftyco/ionic/commit/afd99ba)), closes [#6850](https://github.com/driftyco/ionic/issues/6850)
|
||||
* **datetime:** update selectedIndex according to ngModel value ([74191c3](https://github.com/driftyco/ionic/commit/74191c3))
|
||||
* **infinite-scroll:** add event.timeStamp polyfill for firefox ([#10752](https://github.com/driftyco/ionic/issues/10752)) ([53feb3f](https://github.com/driftyco/ionic/commit/53feb3f))
|
||||
* **picker:** initialize the selectionIndex ([ba35306](https://github.com/driftyco/ionic/commit/ba35306))
|
||||
* **range:** update the bar width correctly ([b541832](https://github.com/driftyco/ionic/commit/b541832)), closes [#10150](https://github.com/driftyco/ionic/issues/10150)
|
||||
* **range:** only activate knob B if range is dual ([d538245](https://github.com/driftyco/ionic/commit/d538245))
|
||||
* **scroll-view:** do not set initialized until it is enabled ([#10817](https://github.com/driftyco/ionic/issues/10817)) ([56364a0](https://github.com/driftyco/ionic/commit/56364a0))
|
||||
* **searchbar:** add IE support ([05859db](https://github.com/driftyco/ionic/commit/05859db))
|
||||
* **select:** make floating labels work for ion-select ([8c483f2](https://github.com/driftyco/ionic/commit/8c483f2)), closes [#10751](https://github.com/driftyco/ionic/issues/10751)
|
||||
* **slides:** fix rtl support ([e90d692](https://github.com/driftyco/ionic/commit/e90d692))
|
||||
* **slides:** simulate touch events for query params ([#10579](https://github.com/driftyco/ionic/issues/10579)) ([e191321](https://github.com/driftyco/ionic/commit/e191321)), closes [#10577](https://github.com/driftyco/ionic/issues/10577)
|
||||
* **toggle/checkbox:** trigger ui update when using virtalScroll with Angular Reactive Forms ([30980b6](https://github.com/driftyco/ionic/commit/30980b6))
|
||||
* **virtual-list:** make virtual-scroll work with infinite-scroll ([999efac](https://github.com/driftyco/ionic/commit/999efac)), closes [#9350](https://github.com/driftyco/ionic/issues/9350) [#9722](https://github.com/driftyco/ionic/issues/9722) [#9247](https://github.com/driftyco/ionic/issues/9247) [#10778](https://github.com/driftyco/ionic/issues/10778)
|
||||
* **virtualscroll:** populate the nodes at the correct height ([51c398d](https://github.com/driftyco/ionic/commit/51c398d))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **alert:** add attributes min & max to alert inputs ([d666e8b](https://github.com/driftyco/ionic/commit/d666e8b))
|
||||
* **alert:** add attributes min & max to alert inputs of type number ([b53219a](https://github.com/driftyco/ionic/commit/b53219a))
|
||||
* **infinite:** add scroll in opposite direction ([#8099](https://github.com/driftyco/ionic/issues/8099)) ([6918275](https://github.com/driftyco/ionic/commit/6918275))
|
||||
* **infinite-scroll:** add `waitFor` method to InfiniteScroll ([84e25a1](https://github.com/driftyco/ionic/commit/84e25a1))
|
||||
* **overlay:** add method chaining pattern to configure overlays ([bee75f7](https://github.com/driftyco/ionic/commit/bee75f7))
|
||||
* **range:** add ionFocus and ionBlur events ([#10761](https://github.com/driftyco/ionic/issues/10761)) ([8f310eb](https://github.com/driftyco/ionic/commit/8f310eb))
|
||||
* **split-pane:** support for side=right ([963cdcb](https://github.com/driftyco/ionic/commit/963cdcb))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **content:** scrollview magic activated on demand ([7e9bad5](https://github.com/driftyco/ionic/commit/7e9bad5))
|
||||
|
||||
|
||||
|
||||
<a name="2.2.0"></a>
|
||||
# [2.2.0](https://github.com/driftyco/ionic/compare/v2.1.0...v2.2.0) (2017-03-08)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ build top quality native and progressive web apps with web technologies.
|
||||
Ionic is based on [Angular](https://angular.io/) and comes with many significant performance, usability, and
|
||||
feature improvements over the past versions.
|
||||
|
||||
See the [Building Apps with Ionic 2](http://adamdbradley.github.io/building-with-ionic2) slides for a quick
|
||||
See the [Building Apps with Ionic](http://adamdbradley.github.io/building-with-ionic2) slides for a quick
|
||||
overview or watch our [Crash Course](https://youtu.be/O2WiI9QrS5s) video for a quick walkthrough on how to get
|
||||
started using Ionic.
|
||||
|
||||
|
||||
66
circle.yml
66
circle.yml
@@ -1,22 +1,44 @@
|
||||
general:
|
||||
branches:
|
||||
ignore:
|
||||
- ins_n_outs
|
||||
machine:
|
||||
node:
|
||||
version: 4.1.0
|
||||
post:
|
||||
- npm install -g npm@3.x.x
|
||||
dependencies:
|
||||
pre:
|
||||
- ./scripts/docs/prepare.sh
|
||||
cache_directories:
|
||||
- "~/ionic-site" # cache ionic-site
|
||||
test:
|
||||
override:
|
||||
- gulp lint.ts
|
||||
deployment:
|
||||
tasks:
|
||||
branch: "master"
|
||||
commands:
|
||||
- ./scripts/ci/deploy.sh
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
working_directory: ~/ionic/
|
||||
docker:
|
||||
- image: node:7
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: ionic-site
|
||||
- run:
|
||||
name: Prepare ionic-site repo
|
||||
command: ./scripts/docs/prepare.sh
|
||||
- save_cache:
|
||||
key: ionic-site
|
||||
paths:
|
||||
- ~/ionic-site/
|
||||
- restore_cache:
|
||||
key: node_modules_{{ checksum "package.json" }}
|
||||
- run:
|
||||
name: Install node modules
|
||||
command: npm i
|
||||
- save_cache:
|
||||
key: node_modules_{{ checksum "package.json" }}
|
||||
paths:
|
||||
- ~/ionic/node_modules/
|
||||
- run:
|
||||
name: Run tslint
|
||||
command: ./node_modules/.bin/gulp lint.ts
|
||||
- run:
|
||||
name: Build Demos
|
||||
command: |
|
||||
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
||||
./node_modules/.bin/gulp demos.prod --production=true --batch=$CIRCLE_NODE_INDEX --batches=$CIRCLE_NODE_TOTAL
|
||||
fi
|
||||
- add_ssh_keys
|
||||
- deploy:
|
||||
name: Update docs
|
||||
command: |
|
||||
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
||||
./scripts/ci/deploy.sh
|
||||
else
|
||||
echo "We are on ${CIRCLE_BRANCH} branch, not going to update docs."
|
||||
fi
|
||||
|
||||
9
demos/src/action-sheet/app/app.component.ts
Normal file
9
demos/src/action-sheet/app/app.component.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { PageOne } from '../pages/page-one/page-one';
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class AppComponent {
|
||||
root = PageOne;
|
||||
}
|
||||
19
demos/src/action-sheet/app/app.module.ts
Normal file
19
demos/src/action-sheet/app/app.module.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { IonicApp, IonicModule } from '../../../../src';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageOneModule } from '../pages/page-one/page-one.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(AppComponent),
|
||||
PageOneModule
|
||||
],
|
||||
bootstrap: [IonicApp]
|
||||
})
|
||||
export class AppModule {}
|
||||
17
demos/src/action-sheet/pages/page-one/page-one.module.ts
Normal file
17
demos/src/action-sheet/pages/page-one/page-one.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageOne } from './page-one';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageOne,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageOne),
|
||||
],
|
||||
entryComponents: [
|
||||
PageOne,
|
||||
]
|
||||
})
|
||||
export class PageOneModule {}
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { ActionSheetController, IonicApp, IonicModule, Platform } from '../../ionic-angular';
|
||||
import { Component } from '@angular/core';
|
||||
import { ActionSheetController, Platform } from '../../../../../src';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page.html'
|
||||
templateUrl: 'page-one.html'
|
||||
})
|
||||
export class ApiDemoPage {
|
||||
export class PageOne {
|
||||
constructor(public alertCtrl: ActionSheetController, public platform: Platform) { }
|
||||
|
||||
present() {
|
||||
@@ -55,26 +55,3 @@ export class ApiDemoPage {
|
||||
actionSheet.present();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class ApiDemoApp {
|
||||
root = ApiDemoPage;
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ApiDemoApp,
|
||||
ApiDemoPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
ApiDemoPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
9
demos/src/alert/app/app.component.ts
Normal file
9
demos/src/alert/app/app.component.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { PageOne } from '../pages/page-one/page-one';
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class AppComponent {
|
||||
root = PageOne;
|
||||
}
|
||||
19
demos/src/alert/app/app.module.ts
Normal file
19
demos/src/alert/app/app.module.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { IonicApp, IonicModule } from '../../../../src';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageOneModule } from '../pages/page-one/page-one.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(AppComponent),
|
||||
PageOneModule
|
||||
],
|
||||
bootstrap: [IonicApp]
|
||||
})
|
||||
export class AppModule {}
|
||||
17
demos/src/alert/pages/page-one/page-one.module.ts
Normal file
17
demos/src/alert/pages/page-one/page-one.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageOne } from './page-one';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageOne,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageOne),
|
||||
],
|
||||
entryComponents: [
|
||||
PageOne,
|
||||
]
|
||||
})
|
||||
export class PageOneModule {}
|
||||
@@ -1,11 +1,10 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { AlertController, IonicApp, IonicModule } from '../../ionic-angular';
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { AlertController } from '../../../../../src';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page.html'
|
||||
templateUrl: 'page-one.html'
|
||||
})
|
||||
export class ApiDemoPage {
|
||||
export class PageOne {
|
||||
testRadioOpen = false;
|
||||
testRadioResult: any;
|
||||
testCheckboxOpen = false;
|
||||
@@ -59,13 +58,13 @@ export class ApiDemoPage {
|
||||
buttons: [
|
||||
{
|
||||
text: 'Cancel',
|
||||
handler: (data: any) => {
|
||||
handler: (data) => {
|
||||
console.log('Cancel clicked');
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'Save',
|
||||
handler: (data: any) => {
|
||||
handler: (data) => {
|
||||
console.log('Saved clicked');
|
||||
}
|
||||
}
|
||||
@@ -208,25 +207,3 @@ export class ApiDemoPage {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Component({
|
||||
template: `<ion-nav [root]="root"></ion-nav>`
|
||||
})
|
||||
export class ApiDemoApp {
|
||||
root = ApiDemoPage;
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ApiDemoApp,
|
||||
ApiDemoPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
ApiDemoPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
@@ -1,32 +0,0 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page.html'
|
||||
})
|
||||
export class ApiDemoPage {}
|
||||
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class ApiDemoApp {
|
||||
root = ApiDemoPage;
|
||||
}
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ApiDemoApp,
|
||||
ApiDemoPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
ApiDemoPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
9
demos/src/button/app/app.component.ts
Normal file
9
demos/src/button/app/app.component.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { PageOne } from '../pages/page-one/page-one';
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class AppComponent {
|
||||
root = PageOne;
|
||||
}
|
||||
19
demos/src/button/app/app.module.ts
Normal file
19
demos/src/button/app/app.module.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { IonicApp, IonicModule } from '../../../../src';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageOneModule } from '../pages/page-one/page-one.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(AppComponent),
|
||||
PageOneModule
|
||||
],
|
||||
bootstrap: [IonicApp]
|
||||
})
|
||||
export class AppModule {}
|
||||
17
demos/src/button/pages/page-one/page-one.module.ts
Normal file
17
demos/src/button/pages/page-one/page-one.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageOne } from './page-one';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageOne,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageOne),
|
||||
],
|
||||
entryComponents: [
|
||||
PageOne,
|
||||
]
|
||||
})
|
||||
export class PageOneModule {}
|
||||
6
demos/src/button/pages/page-one/page-one.ts
Normal file
6
demos/src/button/pages/page-one/page-one.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page-one.html'
|
||||
})
|
||||
export class PageOne {}
|
||||
@@ -1,49 +0,0 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page.html'
|
||||
})
|
||||
export class ApiDemoPage {
|
||||
|
||||
data = {
|
||||
jon: true,
|
||||
daenerys: true,
|
||||
arya: false,
|
||||
tyroin: false,
|
||||
sansa: true,
|
||||
khal: false,
|
||||
cersei: true,
|
||||
stannis: true,
|
||||
petyr: false,
|
||||
hodor: true,
|
||||
catelyn: true,
|
||||
bronn: false
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class ApiDemoApp {
|
||||
root = ApiDemoPage;
|
||||
}
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ApiDemoApp,
|
||||
ApiDemoPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
ApiDemoPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
9
demos/src/checkbox/app/app.component.ts
Normal file
9
demos/src/checkbox/app/app.component.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { PageOne } from '../pages/page-one/page-one';
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class AppComponent {
|
||||
root = PageOne;
|
||||
}
|
||||
19
demos/src/checkbox/app/app.module.ts
Normal file
19
demos/src/checkbox/app/app.module.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { IonicApp, IonicModule } from '../../../../src';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageOneModule } from '../pages/page-one/page-one.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(AppComponent),
|
||||
PageOneModule
|
||||
],
|
||||
bootstrap: [IonicApp]
|
||||
})
|
||||
export class AppModule {}
|
||||
5
demos/src/checkbox/app/main.ts
Normal file
5
demos/src/checkbox/app/main.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
17
demos/src/checkbox/pages/page-one/page-one.module.ts
Normal file
17
demos/src/checkbox/pages/page-one/page-one.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageOne } from './page-one';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageOne,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageOne),
|
||||
],
|
||||
entryComponents: [
|
||||
PageOne,
|
||||
]
|
||||
})
|
||||
export class PageOneModule {}
|
||||
22
demos/src/checkbox/pages/page-one/page-one.ts
Normal file
22
demos/src/checkbox/pages/page-one/page-one.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page-one.html'
|
||||
})
|
||||
export class PageOne {
|
||||
|
||||
data = {
|
||||
jon: true,
|
||||
daenerys: true,
|
||||
arya: false,
|
||||
tyroin: false,
|
||||
sansa: true,
|
||||
khal: false,
|
||||
cersei: true,
|
||||
stannis: true,
|
||||
petyr: false,
|
||||
hodor: true,
|
||||
catelyn: true,
|
||||
bronn: false
|
||||
};
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page.html'
|
||||
})
|
||||
export class ApiDemoPage {
|
||||
delete(chip: Element) {
|
||||
chip.remove();
|
||||
}
|
||||
}
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class ApiDemoApp {
|
||||
root = ApiDemoPage;
|
||||
}
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ApiDemoApp,
|
||||
ApiDemoPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
ApiDemoPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
9
demos/src/chip/app/app.component.ts
Normal file
9
demos/src/chip/app/app.component.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { PageOne } from '../pages/page-one/page-one';
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class AppComponent {
|
||||
root = PageOne;
|
||||
}
|
||||
19
demos/src/chip/app/app.module.ts
Normal file
19
demos/src/chip/app/app.module.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { IonicApp, IonicModule } from '../../../../src';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageOneModule } from '../pages/page-one/page-one.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(AppComponent),
|
||||
PageOneModule
|
||||
],
|
||||
bootstrap: [IonicApp]
|
||||
})
|
||||
export class AppModule {}
|
||||
5
demos/src/chip/app/main.ts
Normal file
5
demos/src/chip/app/main.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
17
demos/src/chip/pages/page-one/page-one.module.ts
Normal file
17
demos/src/chip/pages/page-one/page-one.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageOne } from './page-one';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageOne,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageOne),
|
||||
],
|
||||
entryComponents: [
|
||||
PageOne,
|
||||
]
|
||||
})
|
||||
export class PageOneModule {}
|
||||
10
demos/src/chip/pages/page-one/page-one.ts
Normal file
10
demos/src/chip/pages/page-one/page-one.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page-one.html'
|
||||
})
|
||||
export class PageOne {
|
||||
delete(chip: Element) {
|
||||
chip.remove();
|
||||
}
|
||||
}
|
||||
39
demos/src/config/app/app.component.ts
Normal file
39
demos/src/config/app/app.component.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Config, Platform } from '../../../../src';
|
||||
import { PageOne } from '../pages/page-one/page-one';
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class AppComponent {
|
||||
config: any;
|
||||
root = PageOne;
|
||||
constructor(public _config: Config, public platform: Platform) {
|
||||
|
||||
if (window.localStorage.getItem('configDemo') !== null) {
|
||||
this.config = JSON.parse(window.localStorage.getItem('configDemo'));
|
||||
} else if (platform.is('ios')) {
|
||||
this.config = {
|
||||
'backButtonIcon': 'ios-arrow-back',
|
||||
'iconMode': 'ios',
|
||||
'tabsPlacement': 'bottom'
|
||||
};
|
||||
} else if (platform.is('windows')) {
|
||||
this.config = {
|
||||
'backButtonIcon': 'ios-arrow-back',
|
||||
'iconMode': 'ios',
|
||||
'tabsPlacement': 'top'
|
||||
};
|
||||
} else {
|
||||
this.config = {
|
||||
'backButtonIcon': 'md-arrow-back',
|
||||
'iconMode': 'md',
|
||||
'tabsPlacement': 'bottom'
|
||||
};
|
||||
}
|
||||
|
||||
this._config.set('tabsPlacement', this.config.tabsPlacement);
|
||||
this._config.set('iconMode', this.config.iconMode);
|
||||
this._config.set('backButtonIcon', this.config.backButtonIcon);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,26 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { Config, IonicApp, IonicModule, Platform, NavController } from '../../ionic-angular';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { IonicApp, IonicModule } from '../../../../src';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageOneModule } from '../pages/page-one/page-one.module';
|
||||
import { PageTwoModule } from '../pages/page-two/page-two.module';
|
||||
import { PageThreeModule } from '../pages/page-three/page-three.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(AppComponent, CONFIG_DEMO),
|
||||
PageOneModule,
|
||||
PageTwoModule,
|
||||
PageThreeModule
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
})
|
||||
export class AppModule {}
|
||||
|
||||
if (!window.localStorage) {
|
||||
Object.defineProperty(window, 'localStorage', new (function () {
|
||||
@@ -19,7 +40,7 @@ if (!window.localStorage) {
|
||||
Object.defineProperty(oStorage, 'setItem', {
|
||||
value: function (sKey: string, sValue: string) {
|
||||
if (!sKey) { return; }
|
||||
document.cookie = encodeURI(sKey) + '=' + encodeURI(sValue) + '; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/';
|
||||
document.cookie = encodeURI(sKey) + '=' + encodeURI(sValue) + '; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=';
|
||||
},
|
||||
writable: false,
|
||||
configurable: false,
|
||||
@@ -33,7 +54,7 @@ if (!window.localStorage) {
|
||||
Object.defineProperty(oStorage, 'removeItem', {
|
||||
value: function (sKey: string) {
|
||||
if (!sKey) { return; }
|
||||
document.cookie = encodeURI(sKey) + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/';
|
||||
document.cookie = encodeURI(sKey) + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=';
|
||||
},
|
||||
writable: false,
|
||||
configurable: false,
|
||||
@@ -70,102 +91,3 @@ var CONFIG_DEMO: any = null;
|
||||
if (window.localStorage.getItem('configDemo')) {
|
||||
CONFIG_DEMO = JSON.parse(window.localStorage.getItem('configDemo'));
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'tabs.html'
|
||||
})
|
||||
export class TabPage {
|
||||
tabOne = ApiDemoPage;
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page.html'
|
||||
})
|
||||
export class ApiDemoPage {
|
||||
config: any;
|
||||
initialConfig: any;
|
||||
constructor(_config: Config, public navCtrl: NavController) {
|
||||
this.config = _config.settings();
|
||||
this.initialConfig = this.config;
|
||||
}
|
||||
|
||||
|
||||
load() {
|
||||
window.localStorage.setItem('configDemo', JSON.stringify(this.config));
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
push() {
|
||||
this.navCtrl.push(PushPage);
|
||||
}
|
||||
}
|
||||
|
||||
@Component({
|
||||
templateUrl: 'push-page.html'
|
||||
})
|
||||
export class PushPage {
|
||||
constructor(public navCtrl: NavController) {}
|
||||
|
||||
pop() {
|
||||
this.navCtrl.pop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root" #content></ion-nav>'
|
||||
})
|
||||
export class ApiDemoApp {
|
||||
config: any;
|
||||
root = TabPage;
|
||||
constructor(public _config: Config, public platform: Platform) {
|
||||
|
||||
if (window.localStorage.getItem('configDemo') !== null) {
|
||||
this.config = JSON.parse(window.localStorage.getItem('configDemo'));
|
||||
} else if (platform.is('ios')) {
|
||||
this.config = {
|
||||
'backButtonIcon': 'ios-arrow-back',
|
||||
'iconMode': 'ios',
|
||||
'tabsPlacement': 'bottom'
|
||||
};
|
||||
} else if (platform.is('windows')) {
|
||||
this.config = {
|
||||
'backButtonIcon': 'ios-arrow-back',
|
||||
'iconMode': 'ios',
|
||||
'tabsPlacement': 'top'
|
||||
};
|
||||
} else {
|
||||
this.config = {
|
||||
'backButtonIcon': 'md-arrow-back',
|
||||
'iconMode': 'md',
|
||||
'tabsPlacement': 'bottom'
|
||||
};
|
||||
}
|
||||
|
||||
this._config.set('tabsPlacement', this.config.tabsPlacement);
|
||||
this._config.set('iconMode', this.config.iconMode);
|
||||
this._config.set('backButtonIcon', this.config.backButtonIcon);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ApiDemoApp,
|
||||
ApiDemoPage,
|
||||
PushPage,
|
||||
TabPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp, CONFIG_DEMO)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
ApiDemoPage,
|
||||
PushPage,
|
||||
TabPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
5
demos/src/config/app/main.ts
Normal file
5
demos/src/config/app/main.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
17
demos/src/config/pages/page-one/page-one.module.ts
Normal file
17
demos/src/config/pages/page-one/page-one.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageOne } from './page-one';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageOne,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageOne),
|
||||
],
|
||||
entryComponents: [
|
||||
PageOne,
|
||||
]
|
||||
})
|
||||
export class PageOneModule {}
|
||||
9
demos/src/config/pages/page-one/page-one.ts
Normal file
9
demos/src/config/pages/page-one/page-one.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { PageTwo } from '../page-two/page-two';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page-one.html'
|
||||
})
|
||||
export class PageOne {
|
||||
tabOne = PageTwo;
|
||||
}
|
||||
17
demos/src/config/pages/page-three/page-three.module.ts
Normal file
17
demos/src/config/pages/page-three/page-three.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageThree } from './page-three';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageThree,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageThree),
|
||||
],
|
||||
entryComponents: [
|
||||
PageThree,
|
||||
]
|
||||
})
|
||||
export class PageThreeModule {}
|
||||
13
demos/src/config/pages/page-three/page-three.ts
Normal file
13
demos/src/config/pages/page-three/page-three.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { NavController } from '../../../../../src';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page-three.html'
|
||||
})
|
||||
export class PageThree {
|
||||
constructor(public navCtrl: NavController) {}
|
||||
|
||||
pop() {
|
||||
this.navCtrl.pop();
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,7 @@
|
||||
<pre margin>
|
||||
@NgModule({
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(MyApp, {
|
||||
backButtonIcon: "{{initialConfig?.backButtonIcon}}"
|
||||
iconMode: "{{initialConfig?.iconMode}}"
|
||||
17
demos/src/config/pages/page-two/page-two.module.ts
Normal file
17
demos/src/config/pages/page-two/page-two.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageTwo } from './page-two';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageTwo,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageTwo),
|
||||
],
|
||||
entryComponents: [
|
||||
PageTwo,
|
||||
]
|
||||
})
|
||||
export class PageTwoModule {}
|
||||
24
demos/src/config/pages/page-two/page-two.ts
Normal file
24
demos/src/config/pages/page-two/page-two.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Config, NavController } from '../../../../../src';
|
||||
import { PageThree } from '../page-three/page-three';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page-two.html'
|
||||
})
|
||||
export class PageTwo {
|
||||
config: any;
|
||||
initialConfig: any;
|
||||
constructor(_config: Config, public navCtrl: NavController) {
|
||||
this.config = _config.settings();
|
||||
this.initialConfig = this.config;
|
||||
}
|
||||
|
||||
load() {
|
||||
window.localStorage.setItem('configDemo', JSON.stringify(this.config));
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
push() {
|
||||
this.navCtrl.push(PageThree);
|
||||
}
|
||||
}
|
||||
11
demos/src/config/pages/push-page.html
Normal file
11
demos/src/config/pages/push-page.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<ion-header>
|
||||
<ion-navbar>
|
||||
<ion-title>Page</ion-title>
|
||||
</ion-navbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div padding>
|
||||
<button ion-button block (click)="pop()">Go Back to Config</button>
|
||||
</div>
|
||||
</ion-content>
|
||||
9
demos/src/datetime/app/app.component.ts
Normal file
9
demos/src/datetime/app/app.component.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { PageOne } from '../pages/page-one/page-one';
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class AppComponent {
|
||||
root = PageOne;
|
||||
}
|
||||
19
demos/src/datetime/app/app.module.ts
Normal file
19
demos/src/datetime/app/app.module.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { IonicApp, IonicModule } from '../../../../src';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageOneModule } from '../pages/page-one/page-one.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(AppComponent),
|
||||
PageOneModule
|
||||
],
|
||||
bootstrap: [IonicApp]
|
||||
})
|
||||
export class AppModule {}
|
||||
5
demos/src/datetime/app/main.ts
Normal file
5
demos/src/datetime/app/main.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
17
demos/src/datetime/pages/page-one/page-one.module.ts
Normal file
17
demos/src/datetime/pages/page-one/page-one.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageOne } from './page-one';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageOne,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageOne),
|
||||
],
|
||||
entryComponents: [
|
||||
PageOne,
|
||||
]
|
||||
})
|
||||
export class PageOneModule {}
|
||||
@@ -1,11 +1,9 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../ionic-angular';
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page.html'
|
||||
templateUrl: 'page-one.html'
|
||||
})
|
||||
export class ApiDemoPage {
|
||||
export class PageOne {
|
||||
wwwReleased = '1991';
|
||||
netscapeReleased = '1994-12-15T13:47:20.789';
|
||||
operaReleased = '1995-04-15';
|
||||
@@ -40,7 +38,7 @@ export class ApiDemoPage {
|
||||
}
|
||||
}
|
||||
|
||||
calculateTime(offset) {
|
||||
calculateTime(offset: any) {
|
||||
// create Date object for current location
|
||||
let d = new Date();
|
||||
|
||||
@@ -52,37 +50,13 @@ export class ApiDemoPage {
|
||||
}
|
||||
|
||||
// Determine if the client uses DST
|
||||
stdTimezoneOffset(today) {
|
||||
stdTimezoneOffset(today: any) {
|
||||
let jan = new Date(today.getFullYear(), 0, 1);
|
||||
let jul = new Date(today.getFullYear(), 6, 1);
|
||||
return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset());
|
||||
}
|
||||
|
||||
dst(today) {
|
||||
dst(today: any) {
|
||||
return today.getTimezoneOffset() < this.stdTimezoneOffset(today);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class ApiDemoApp {
|
||||
root = ApiDemoPage;
|
||||
}
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ApiDemoApp,
|
||||
ApiDemoPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
ApiDemoPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
@@ -1,89 +0,0 @@
|
||||
import { Component, NgModule, ViewChild } from '@angular/core';
|
||||
import { Events, IonicApp, IonicModule, Nav } from '../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'login.html'
|
||||
})
|
||||
export class Login {
|
||||
user = {
|
||||
name: 'Administrator',
|
||||
username: 'admin'
|
||||
};
|
||||
|
||||
constructor(private events: Events) {}
|
||||
|
||||
login() {
|
||||
this.events.publish('user:login');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Component({
|
||||
templateUrl: 'logout.html'
|
||||
})
|
||||
export class Logout {
|
||||
constructor(private events: Events) {}
|
||||
|
||||
logout() {
|
||||
this.events.publish('user:logout');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'app.html'
|
||||
})
|
||||
export class ApiDemoApp {
|
||||
@ViewChild(Nav) nav: Nav;
|
||||
|
||||
root = Login;
|
||||
loggedIn = false;
|
||||
|
||||
loggedInPages = [
|
||||
{ title: 'Logout', component: Logout }
|
||||
];
|
||||
|
||||
loggedOutPages = [
|
||||
{ title: 'Login', component: Login }
|
||||
];
|
||||
|
||||
constructor(private events: Events) {
|
||||
this.listenToLoginEvents();
|
||||
}
|
||||
|
||||
openPage(menu, page) {
|
||||
// find the nav component and set what the root page should be
|
||||
// reset the nav to remove previous pages and only have this page
|
||||
// we wouldn't want the back button to show in this scenario
|
||||
this.nav.setRoot(page.component);
|
||||
}
|
||||
|
||||
listenToLoginEvents() {
|
||||
this.events.subscribe('user:login', () => {
|
||||
this.loggedIn = true;
|
||||
});
|
||||
|
||||
this.events.subscribe('user:logout', () => {
|
||||
this.loggedIn = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ApiDemoApp,
|
||||
Login,
|
||||
Logout
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
Login,
|
||||
Logout
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
45
demos/src/events/app/app.component.ts
Normal file
45
demos/src/events/app/app.component.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { Component, ViewChild } from '@angular/core';
|
||||
import { Events, Nav } from '../../../../src';
|
||||
|
||||
import { PageOne } from '../pages/page-one/page-one';
|
||||
import { PageTwo } from '../pages/page-two/page-two';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'app.component.html'
|
||||
})
|
||||
export class AppComponent {
|
||||
|
||||
@ViewChild(Nav) nav: Nav;
|
||||
|
||||
root = PageOne;
|
||||
loggedIn = false;
|
||||
|
||||
loggedInPages = [
|
||||
{ title: 'Logout', component: PageTwo }
|
||||
];
|
||||
|
||||
loggedOutPages = [
|
||||
{ title: 'Login', component: PageOne }
|
||||
];
|
||||
|
||||
constructor(private events: Events) {
|
||||
this.listenToLoginEvents();
|
||||
}
|
||||
|
||||
openPage(menu: any, page: any) {
|
||||
// find the nav component and set what the root page should be
|
||||
// reset the nav to remove previous pages and only have this page
|
||||
// we wouldn't want the back button to show in this scenario
|
||||
this.nav.setRoot(page.component);
|
||||
}
|
||||
|
||||
listenToLoginEvents() {
|
||||
this.events.subscribe('user:login', () => {
|
||||
this.loggedIn = true;
|
||||
});
|
||||
|
||||
this.events.subscribe('user:logout', () => {
|
||||
this.loggedIn = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
21
demos/src/events/app/app.module.ts
Normal file
21
demos/src/events/app/app.module.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { IonicApp, IonicModule } from '../../../../src';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageOneModule } from '../pages/page-one/page-one.module';
|
||||
import { PageTwoModule } from '../pages/page-two/page-two.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(AppComponent),
|
||||
PageOneModule,
|
||||
PageTwoModule
|
||||
],
|
||||
bootstrap: [IonicApp]
|
||||
})
|
||||
export class AppModule {}
|
||||
5
demos/src/events/app/main.ts
Normal file
5
demos/src/events/app/main.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
17
demos/src/events/pages/page-one/page-one.module.ts
Normal file
17
demos/src/events/pages/page-one/page-one.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageOne } from './page-one';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageOne,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageOne),
|
||||
],
|
||||
entryComponents: [
|
||||
PageOne,
|
||||
]
|
||||
})
|
||||
export class PageOneModule {}
|
||||
18
demos/src/events/pages/page-one/page-one.ts
Normal file
18
demos/src/events/pages/page-one/page-one.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Events } from '../../../../../src';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page-one.html'
|
||||
})
|
||||
export class PageOne {
|
||||
user = {
|
||||
name: 'Administrator',
|
||||
username: 'admin'
|
||||
};
|
||||
|
||||
constructor(private events: Events) {}
|
||||
|
||||
login() {
|
||||
this.events.publish('user:login');
|
||||
}
|
||||
}
|
||||
17
demos/src/events/pages/page-two/page-two.module.ts
Normal file
17
demos/src/events/pages/page-two/page-two.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageTwo } from './page-two';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageTwo,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageTwo),
|
||||
],
|
||||
entryComponents: [
|
||||
PageTwo,
|
||||
]
|
||||
})
|
||||
export class PageTwoModule {}
|
||||
13
demos/src/events/pages/page-two/page-two.ts
Normal file
13
demos/src/events/pages/page-two/page-two.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Events } from '../../../../../src';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page-two.html'
|
||||
})
|
||||
export class PageTwo {
|
||||
constructor(private events: Events) {}
|
||||
|
||||
logout() {
|
||||
this.events.publish('user:logout');
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { FabContainer, IonicApp, IonicModule } from '../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page.html'
|
||||
})
|
||||
export class ApiDemoPage {
|
||||
array: number[] = [];
|
||||
|
||||
add() {
|
||||
this.array.push(1);
|
||||
}
|
||||
|
||||
clickMainFAB() {
|
||||
console.log('Clicked open social menu');
|
||||
}
|
||||
|
||||
openSocial(network: string, fab: FabContainer) {
|
||||
console.log('Share in ' + network);
|
||||
fab.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class ApiDemoApp {
|
||||
root = ApiDemoPage;
|
||||
}
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ApiDemoApp,
|
||||
ApiDemoPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
ApiDemoPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
|
||||
9
demos/src/fab/app/app.component.ts
Normal file
9
demos/src/fab/app/app.component.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { PageOne } from '../pages/page-one/page-one';
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class AppComponent {
|
||||
root = PageOne;
|
||||
}
|
||||
19
demos/src/fab/app/app.module.ts
Normal file
19
demos/src/fab/app/app.module.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { IonicApp, IonicModule } from '../../../../src';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageOneModule } from '../pages/page-one/page-one.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(AppComponent),
|
||||
PageOneModule
|
||||
],
|
||||
bootstrap: [IonicApp]
|
||||
})
|
||||
export class AppModule {}
|
||||
5
demos/src/fab/app/main.ts
Normal file
5
demos/src/fab/app/main.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
17
demos/src/fab/pages/page-one/page-one.module.ts
Normal file
17
demos/src/fab/pages/page-one/page-one.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageOne } from './page-one';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageOne,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageOne),
|
||||
],
|
||||
entryComponents: [
|
||||
PageOne,
|
||||
]
|
||||
})
|
||||
export class PageOneModule {}
|
||||
22
demos/src/fab/pages/page-one/page-one.ts
Normal file
22
demos/src/fab/pages/page-one/page-one.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { FabContainer } from '../../../../../src';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page-one.html'
|
||||
})
|
||||
export class PageOne {
|
||||
array: number[] = [];
|
||||
|
||||
add() {
|
||||
this.array.push(1);
|
||||
}
|
||||
|
||||
clickMainFAB() {
|
||||
console.log('Clicked open social menu');
|
||||
}
|
||||
|
||||
openSocial(network: string, fab: FabContainer) {
|
||||
console.log('Share in ' + network);
|
||||
fab.close();
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page.html'
|
||||
})
|
||||
export class ApiDemoPage {}
|
||||
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class ApiDemoApp {
|
||||
root = ApiDemoPage;
|
||||
}
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ApiDemoApp,
|
||||
ApiDemoPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
ApiDemoPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
9
demos/src/hide-when/app/app.component.ts
Normal file
9
demos/src/hide-when/app/app.component.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { PageOne } from '../pages/page-one/page-one';
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class AppComponent {
|
||||
root = PageOne;
|
||||
}
|
||||
19
demos/src/hide-when/app/app.module.ts
Normal file
19
demos/src/hide-when/app/app.module.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { IonicApp, IonicModule } from '../../../../src';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageOneModule } from '../pages/page-one/page-one.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(AppComponent),
|
||||
PageOneModule
|
||||
],
|
||||
bootstrap: [IonicApp]
|
||||
})
|
||||
export class AppModule {}
|
||||
5
demos/src/hide-when/app/main.ts
Normal file
5
demos/src/hide-when/app/main.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
17
demos/src/hide-when/pages/page-one/page-one.module.ts
Normal file
17
demos/src/hide-when/pages/page-one/page-one.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageOne } from './page-one';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageOne,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageOne),
|
||||
],
|
||||
entryComponents: [
|
||||
PageOne,
|
||||
]
|
||||
})
|
||||
export class PageOneModule {}
|
||||
6
demos/src/hide-when/pages/page-one/page-one.ts
Normal file
6
demos/src/hide-when/pages/page-one/page-one.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page-one.html'
|
||||
})
|
||||
export class PageOne {}
|
||||
@@ -1,32 +0,0 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page.html'
|
||||
})
|
||||
export class ApiDemoPage {}
|
||||
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class ApiDemoApp {
|
||||
root = ApiDemoPage;
|
||||
}
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ApiDemoApp,
|
||||
ApiDemoPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
ApiDemoPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
9
demos/src/icon/app/app.component.ts
Normal file
9
demos/src/icon/app/app.component.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { PageOne } from '../pages/page-one/page-one';
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class AppComponent {
|
||||
root = PageOne;
|
||||
}
|
||||
19
demos/src/icon/app/app.module.ts
Normal file
19
demos/src/icon/app/app.module.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { IonicApp, IonicModule } from '../../../../src';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageOneModule } from '../pages/page-one/page-one.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(AppComponent),
|
||||
PageOneModule
|
||||
],
|
||||
bootstrap: [IonicApp]
|
||||
})
|
||||
export class AppModule {}
|
||||
5
demos/src/icon/app/main.ts
Normal file
5
demos/src/icon/app/main.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
17
demos/src/icon/pages/page-one/page-one.module.ts
Normal file
17
demos/src/icon/pages/page-one/page-one.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageOne } from './page-one';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageOne,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageOne),
|
||||
],
|
||||
entryComponents: [
|
||||
PageOne,
|
||||
]
|
||||
})
|
||||
export class PageOneModule {}
|
||||
6
demos/src/icon/pages/page-one/page-one.ts
Normal file
6
demos/src/icon/pages/page-one/page-one.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page-one.html'
|
||||
})
|
||||
export class PageOne {}
|
||||
@@ -1,117 +0,0 @@
|
||||
import { Component, Injectable, NgModule } from '@angular/core';
|
||||
import { InfiniteScroll, IonicApp, IonicModule } from '../../ionic-angular';
|
||||
|
||||
|
||||
/**
|
||||
* Mock Data Access Object
|
||||
**/
|
||||
@Injectable()
|
||||
export class MockProvider {
|
||||
|
||||
getData(): any[] {
|
||||
// return mock data synchronously
|
||||
let data = [];
|
||||
for (var i = 0; i < 20; i++) {
|
||||
data.push( this._getRandomData() );
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
getAsyncData(): Promise<any[]> {
|
||||
// async receive mock data
|
||||
return new Promise(resolve => {
|
||||
|
||||
setTimeout(() => {
|
||||
resolve(this.getData());
|
||||
}, 1000);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private _getRandomData() {
|
||||
let i = Math.floor( Math.random() * this._data.length );
|
||||
return this._data[i];
|
||||
}
|
||||
|
||||
private _data = [
|
||||
'Fast Times at Ridgemont High',
|
||||
'Peggy Sue Got Married',
|
||||
'Raising Arizona',
|
||||
'Moonstruck',
|
||||
'Fire Birds',
|
||||
'Honeymoon in Vegas',
|
||||
'Amos & Andrew',
|
||||
'It Could Happen to You',
|
||||
'Trapped in Paradise',
|
||||
'Leaving Las Vegas',
|
||||
'The Rock',
|
||||
'Con Air',
|
||||
'Face/Off',
|
||||
'City of Angels',
|
||||
'Gone in Sixty Seconds',
|
||||
'The Family Man',
|
||||
'Windtalkers',
|
||||
'Matchstick Men',
|
||||
'National Treasure',
|
||||
'Ghost Rider',
|
||||
'Grindhouse',
|
||||
'Next',
|
||||
'Kick-Ass',
|
||||
'Drive Angry',
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page.html'
|
||||
})
|
||||
export class ApiDemoPage {
|
||||
items: string[];
|
||||
|
||||
constructor(private mockProvider: MockProvider) {
|
||||
this.items = mockProvider.getData();
|
||||
}
|
||||
|
||||
doInfinite(infiniteScroll: InfiniteScroll) {
|
||||
this.mockProvider.getAsyncData().then((newData) => {
|
||||
for (var i = 0; i < newData.length; i++) {
|
||||
this.items.push( newData[i] );
|
||||
}
|
||||
|
||||
infiniteScroll.complete();
|
||||
|
||||
if (this.items.length > 90) {
|
||||
infiniteScroll.enable(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="rootPage"></ion-nav>'
|
||||
})
|
||||
export class ApiDemoApp {
|
||||
rootPage = ApiDemoPage;
|
||||
}
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ApiDemoApp,
|
||||
ApiDemoPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
ApiDemoApp,
|
||||
ApiDemoPage
|
||||
],
|
||||
providers: [
|
||||
MockProvider
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
9
demos/src/infinite-scroll/app/app.component.ts
Normal file
9
demos/src/infinite-scroll/app/app.component.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { PageOne } from '../pages/page-one/page-one';
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class AppComponent {
|
||||
root = PageOne;
|
||||
}
|
||||
19
demos/src/infinite-scroll/app/app.module.ts
Normal file
19
demos/src/infinite-scroll/app/app.module.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { IonicApp, IonicModule } from '../../../../src';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageOneModule } from '../pages/page-one/page-one.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(AppComponent),
|
||||
PageOneModule
|
||||
],
|
||||
bootstrap: [IonicApp]
|
||||
})
|
||||
export class AppModule {}
|
||||
5
demos/src/infinite-scroll/app/main.ts
Normal file
5
demos/src/infinite-scroll/app/main.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
21
demos/src/infinite-scroll/pages/page-one/page-one.module.ts
Normal file
21
demos/src/infinite-scroll/pages/page-one/page-one.module.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from '../../../../../src';
|
||||
|
||||
import { PageOne } from './page-one';
|
||||
import { MockProvider } from './provider';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageOne,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(PageOne),
|
||||
],
|
||||
entryComponents: [
|
||||
PageOne,
|
||||
],
|
||||
providers: [
|
||||
MockProvider
|
||||
]
|
||||
})
|
||||
export class PageOneModule {}
|
||||
28
demos/src/infinite-scroll/pages/page-one/page-one.ts
Normal file
28
demos/src/infinite-scroll/pages/page-one/page-one.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { MockProvider} from './provider';
|
||||
import { InfiniteScroll } from '../../../../../src';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page-one.html'
|
||||
})
|
||||
export class PageOne {
|
||||
items: string[];
|
||||
|
||||
constructor(private mockProvider: MockProvider) {
|
||||
this.items = mockProvider.getData();
|
||||
}
|
||||
|
||||
doInfinite(infiniteScroll: InfiniteScroll) {
|
||||
this.mockProvider.getAsyncData().then((newData) => {
|
||||
for (var i = 0; i < newData.length; i++) {
|
||||
this.items.push( newData[i] );
|
||||
}
|
||||
|
||||
infiniteScroll.complete();
|
||||
|
||||
if (this.items.length > 90) {
|
||||
infiniteScroll.enable(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
58
demos/src/infinite-scroll/pages/page-one/provider.ts
Normal file
58
demos/src/infinite-scroll/pages/page-one/provider.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
export class MockProvider {
|
||||
|
||||
getData(): any[] {
|
||||
// return mock data synchronously
|
||||
let data: any[] = [];
|
||||
for (var i = 0; i < 20; i++) {
|
||||
data.push( this._getRandomData() );
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
getAsyncData(): Promise<any[]> {
|
||||
// async receive mock data
|
||||
return new Promise(resolve => {
|
||||
|
||||
setTimeout(() => {
|
||||
resolve(this.getData());
|
||||
}, 1000);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private _getRandomData() {
|
||||
let i = Math.floor( Math.random() * this._data.length );
|
||||
return this._data[i];
|
||||
}
|
||||
|
||||
private _data = [
|
||||
'Fast Times at Ridgemont High',
|
||||
'Peggy Sue Got Married',
|
||||
'Raising Arizona',
|
||||
'Moonstruck',
|
||||
'Fire Birds',
|
||||
'Honeymoon in Vegas',
|
||||
'Amos & Andrew',
|
||||
'It Could Happen to You',
|
||||
'Trapped in Paradise',
|
||||
'Leaving Las Vegas',
|
||||
'The Rock',
|
||||
'Con Air',
|
||||
'Face/Off',
|
||||
'City of Angels',
|
||||
'Gone in Sixty Seconds',
|
||||
'The Family Man',
|
||||
'Windtalkers',
|
||||
'Matchstick Men',
|
||||
'National Treasure',
|
||||
'Ghost Rider',
|
||||
'Grindhouse',
|
||||
'Next',
|
||||
'Kick-Ass',
|
||||
'Drive Angry',
|
||||
];
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page.html'
|
||||
})
|
||||
export class ApiDemoPage {}
|
||||
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class ApiDemoApp {
|
||||
root = ApiDemoPage;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ApiDemoApp,
|
||||
ApiDemoPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
ApiDemoPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
9
demos/src/input/app/app.component.ts
Normal file
9
demos/src/input/app/app.component.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { PageOne } from '../pages/page-one/page-one';
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
export class AppComponent {
|
||||
root = PageOne;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user