Compare commits

..

232 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
Brandy Carney
921ccbb79e revert(item): revert the change from margin to padding right
this should have been changed for margin, not padding
2017-09-27 15:59:30 -04:00
Dan Bucholtz
c08de08d5f chore(dependencies): update to latest 2017-09-27 12:54:40 -05:00
Dan Bucholtz
4199accdc2 chore(dependencies): update to latest app-scripts 2017-09-27 11:27:36 -05:00
Brandy Carney
70ab2a4e74 chore(app-scripts): update to latest nightly 2017-09-27 10:31:26 -04:00
mhartington
eacc5d4f23 chore(): fix gulp task 2017-09-26 13:46:57 -04:00
Mike Hartington
112d4f5490 feat(): initial iphoneX support
* feat(cordova): add ios11 safeAreaInsets support

* feat(cordova): ios11 padding mixin

* chore(dependencies): go to angular 4.1.3

* chore(build): temporarily disable git pull and status from master as part of build

* fix(sass): add a mixin for the safe-area-padding

* style(sass): fix sass lint errors

* style(): tabs, footer, content changes

* fix(): lint

* style(sass): fix sass linter error

* refactor(footer): use safe area for all modes

* fix(tabs): increase font-weight of tabs for iOS 11

* style(): fix content padding and sizing

* style(sass): fix linter and remove unused vars

* style(): actionsheet, toast, header updates

* fix(): sass lint

* chore(): backout release changes

* chore(): update to lastest master
2017-09-26 13:27:34 -04:00
Dan Bucholtz
f42e81b02b chore(dependencies): revert to ts 2.3.x 2017-09-25 23:33:03 -05:00
Dan Bucholtz
9b5c0e035b chore(dependencies): update to latest angular 2017-09-25 23:33:03 -05:00
Daniel Sogl
4e56458b5c docs(nav-params): cosmetically improve documentation (#12972) 2017-09-25 21:31:22 -05:00
Ken Sodemann
b5bfda2c42 docs(slides): clarify how zooming works (#12932)
fixes #12861
2017-09-25 21:27:09 -05:00
Daniel Sogl
200fa935b8 docs(toast-controller): use const instead of let (#12962) 2017-09-25 21:24:19 -05:00
Daniel Sogl
66faa1d959 docs(action-sheet-controller): use const instead of let (#12963) 2017-09-25 21:22:19 -05:00
Daniel Sogl
b248eb7508 docs(alert-controller): use const instead of let (#12964) 2017-09-25 21:20:12 -05:00
Daniel Sogl
c7b2b186ec docs(events): cosmetically improve documentation (#12965) 2017-09-25 21:15:55 -05:00
Daniel Sogl
86210750d5 docs(haptic): cosmetically improve documentation (#12966) 2017-09-25 21:14:16 -05:00
Daniel Sogl
794d88d455 docs(ionic-error-handler): cosmetically improve documentation (#12968) 2017-09-25 21:11:27 -05:00
Daniel Sogl
a48d02a966 docs(keyboard): cosmetically improve documentation (#12969) 2017-09-25 20:59:39 -05:00
Daniel Sogl
d028a29d0e docs(loading-controller): use const instead of let (#12970) 2017-09-25 20:29:33 -05:00
Daniel Sogl
288c00a641 docs(modal-controller): use const instead of let (#12971) 2017-09-25 20:26:39 -05:00
Ken Sodemann
3b5c34c801 chore(): fix typo in issue template 2017-09-24 14:25:54 -05:00
Ken Sodemann
f2dc8b24b1 chore(): add information to issue template
The following information was added:

* removed the v1 checkbox, left link to v1 repo
* added link for Ionic Pro issues
* more clearly redirect How To type questions to the public forums
* suggest sample code in following order: GitHub, StackBlitz, Plunker
2017-09-20 16:26:30 -05:00
Okafor Ikenna
547ab8d8ef docs(LoadingController): add the import statement (#12910) 2017-09-18 12:24:33 -05:00
Marshall Hoang
e2b3d753a7 docs(demos): add event target to searchbar demo (#12685) 2017-09-18 12:05:58 -05:00
Viachesalv Osadchiy
3fb0371927 docs(MenuToggle): fix navbar link (#12211) 2017-09-15 19:38:03 -05:00
Dan Bucholtz
59f97e780d chore(demos): remove unused gulp tasks (I hope) 2017-09-15 15:41:41 -05:00
Dan Bucholtz
468dcd32fa chore(dependencies): updated the ol' lock file 2017-09-15 15:00:02 -05:00
Елин Й
cfd9e3b3a9 fix minor grammar (#12840) 2017-09-15 06:14:30 -05:00
mhartington
86e2742d58 doc(): fix demos, e2e, and app-script version 2017-09-14 18:22:56 -04:00
Dan Bucholtz
8c207e827e chore(dependencies): update lock file 2017-09-13 13:01:20 -05:00
Daniel Sogl
fdacbbf1d0 chore(package): bump RXJS, zone.js (#12000)
* chore(package): bump Angular version

### Bug Fixes
* **animations:** ensure web-animations understands a numeric CSS perspective value ([819514a](https://github.com/angular/angular/commit/819514a)), closes [#14007](https://github.com/angular/angular/issues/14007)
* **animations:** evaluate substitutions on option param values ([e9886d7](https://github.com/angular/angular/commit/e9886d7))
* **forms:** fix min and max validator behavior on non-numbers ([a222c3e](https://github.com/angular/angular/commit/a222c3e))
* **router:** opening links in new window ([4c32cb9](https://github.com/angular/angular/commit/4c32cb9))
* **upgrade:** call setInterval outside the Angular zone ([269bbe0](https://github.com/angular/angular/commit/269bbe0))

### Features
* **compiler-cli:** introduce synchronous codegen API ([b00b80a](https://github.com/angular/angular/commit/b00b80a))

### Performance Improvements
* **animations:** do not create a closure each time a node is removed ([fe6b39d](https://github.com/angular/angular/commit/fe6b39d))
* **animations:** only apply `:leave` flags if animations are set to run ([b55adee](https://github.com/angular/angular/commit/b55adee))

* Create package.json

* Create package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json

* Update package.json
2017-09-13 12:22:46 -05:00
Dan Bucholtz
ac04710b8a chore(dependencies): update to latest angular and typescript
* chore(gitignore): update gitignore to includ .sourcemaps per new app-scripts

* chore(dependencies): update to latest typescript, angular

* chore(gestures): fix typing issue

* wip

* I accidentally removed the license, so adding it back in

* chore(dependencies): update lock file
2017-09-12 12:43:55 -05:00
Ken Sodemann
d0cad6b31e fix(input): mark ion-input touched on blur instead of changed (#12812)
fixes #12102
2017-09-11 09:54:34 -05:00
Ken Sodemann
f5ef1ca552 fix(swiper): change var to let to avoid variable shadowing 2017-09-08 12:42:27 -05:00
Ken Sodemann
830f885a06 chore(release): update CHANGELOG.md and package.json 2017-09-07 16:59:13 -05:00
Dan Bucholtz
318737535f fix(navigation): fix popTo signature and make usage uniform 2017-09-06 15:50:00 -05:00
Dan Bucholtz
04fe92cd58 chore(gitignore): update gitignore to includ .sourcemaps per new app-scripts 2017-09-06 15:12:51 -05:00
Ken Sodemann
b809665944 fix(slider): guard the processing of _slides
This fixes issue ##12791
2017-09-05 09:35:10 -05:00
mhartington
4d786b30ba docs(modal): fix trailing space 2017-09-01 12:19:19 -04:00
Wilson Hobbs
4f49f27824 docs(modal): add example of nested ionNav in modal 2017-09-01 12:15:06 -04:00
Jan Piotrowski
7e8bd5a8fe docs(platform): make more readable 2017-09-01 12:08:58 -04:00
Jan Piotrowski
f4539aacc9 docs(datetime): add note about Date().toISOString(); (#12501)
* add note about `Date().toISOString();`

right now the docs is missing the information how to actually create such an ISO string in a simple way. This adds the most basic example possible.

* docs(datetime): remove type definition from example
2017-08-31 13:23:19 -05:00
Jan Piotrowski
4911d9f01a docs(nav-push): change property order (#12468)
same order as in constructor and per importance
2017-08-31 14:06:53 -04:00
Henry Dang
6e64b8d915 docs(modal): fix improper capitalization (#12321) 2017-08-31 14:03:08 -04:00
Daniel Fliegauf
e3216da03e docs(config): add statusbarPadding to config (#12168)
Add parameter for hiding extra padding when statusbar is hidden.
2017-08-31 14:00:23 -04:00
Todd Pressley
bd0c265978 docs(content): correct content docs typo, "need" (#12707)
Corrects easily missed typo in `ion-content` documentation: "if ... need," to "... needed"
2017-08-31 13:56:14 -04:00
Alex Ford
846eb09991 docs(nav-params): include import statements (#12657)
docs(nav-params): include import statements
2017-08-31 13:55:23 -04:00
Jeff Cressman
ac4a043314 docs(toolbar): fix a spelling error for toolbar-header (#12676)
docs(toolbar): fix a spelling error for toolbar-header
2017-08-31 13:36:26 -04:00
Brian Soumakian
106950533c fix(navigation): ensure secondaryId always has a string value (#12641) 2017-08-31 12:31:14 -05:00
Appie
295fe783b0 docs(datetime): fix typo (#12776) 2017-08-31 13:26:21 -04:00
Brian Soumakian
0a6bb3bb21 fix(navigation): check existence of done transition callback (#12640) 2017-08-31 09:30:34 -05:00
Ken Sodemann
1b9c3daef1 chore(issue template): add resources to the issue template 2017-08-29 12:51:40 -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
perry
26b09f1d49 chore(CI): branches property must be a child of build 2017-08-10 13:38:05 -05:00
perry
1e9539b9df chore(CI): don’t need to ingore core/overlay branch 2017-08-10 13:31:43 -05:00
perry
17b3a39f0d chore(CI): ignore refactor branches 2017-08-10 13:28:42 -05:00
Daniel Imhoff
475b722c7d fix(generators): Update documentation URLs for templates
fixes https://github.com/ionic-team/ionic-cli/issues/2622
2017-08-09 14:02:52 -05:00
Kelvin Dart
50beafae6a docs(input): correct the autocomplete and autocorrect description (#12613) 2017-08-08 12:42:07 +02:00
Dan Bucholtz
f605f0a74c chore(changelog): add details about tabUrlPath to changelog 2017-07-27 15:04:21 -05:00
Dan Bucholtz
e401997a42 chore(changelog): change --save to --save-dev for app-scripts 2017-07-27 15:00:32 -05:00
Dan Bucholtz
16f2ebe241 chore(changelog): 3.6.0 changelog 2017-07-27 14:58:02 -05:00
Dan Bucholtz
584afd040f fix(navigation): fix null pointer exceptions that would occur when destroying a nav controller while its transitioning 2017-07-26 00:42:28 -05:00
Dan Bucholtz
de0f9d5f28 fix(nav): make call to setPages return the promise so if it rejects it doesn't get lost 2017-07-25 23:57:04 -05:00
Dan Bucholtz
4596dbe5c0 fix(navigation): account for race conditions in developer's code 2017-07-25 13:27:21 -05:00
Mike Hartington
400aa549d4 feat(generators): refactor generators
* feat(generators): update templates

* feat(generators): add pipeName to templates
2017-07-25 11:28:13 -04:00
Dan Bucholtz
add0c4ecfe fix(navigation): fix bug where that occurred when tab identifier and segment had the exact same string 2017-07-24 17:03:36 -05:00
Dan Bucholtz
519d657e6e chore(karma): fix duplicate console.log issue 2017-07-24 17:02:57 -05:00
Dan Bucholtz
a8ceee467b fix(navigation): reduce urls to minimum set of fields
* wip

* simple-nav, simple-tabs, simple-nav-then-tabs, simple-nested-navs all pass w00t w00t

* updates

* fix tests

* update test
2017-07-21 23:47:45 -05:00
pwespi
97f9522110 fix(list): remove margin of MD buttons in ion-item-options (#12263) 2017-07-21 12:48:38 -04:00
Samuel Goodell
961bfc3ebb chore(docs): add anchor links to documentation sub-sections (#12386)
* chore(docs): add anchor links to documentation sub-sections

* chore(docs): make entire section headings clickable as anchors
2017-07-18 15:16:11 -05:00
Dan Bucholtz
5b9fe5e81a chore(changelog): 3.5.3 release 2017-07-14 12:25:46 -05:00
Dan Bucholtz
c4e7552b56 chore(dependencies): update the lock file 2017-07-14 12:03:16 -05:00
Dan Bucholtz
cec718c6c7 chore(dependencies): removing tsc-wrapped since angular explicitely says not to do this 2017-07-14 12:00:48 -05:00
Dan Bucholtz
ab511c4744 chore(dependencies): add angular/tsc-wrapper to package.json to avoid npm issues people are having 2017-07-14 11:55:44 -05:00
Dan Bucholtz
2d49e10da4 fix(app): restore getActiveNav api
restore getActiveNav api
2017-07-14 10:41:45 -05:00
Dan Bucholtz
ce46c24413 chore(changelog): 3.5.2 changelog
3.5.2 changelog
2017-07-14 10:41:45 -05:00
peterpeterparker
f7fce5fa16 chore(changelog): update changelog to save app-scripts as devDependency 2017-07-14 10:02:41 -05:00
B
d23b9f7d49 docs(toast): add import statement in usage (#12278)
Cannot use ToastController without knowing from where to import it
2017-07-13 12:05:56 -04:00
Dan Bucholtz
4c13535416 chore(changelog): additional details about upgrading and updating app-scripts 2017-07-13 10:12:26 -05:00
Dan Bucholtz
889b49f372 chore(changelog): 3.5.2 upgrade instructions 2017-07-13 09:57:08 -05:00
Dan Bucholtz
acb6facc7b chore(changelog): 3.5.2 release
3.5.2 release
2017-07-13 09:52:21 -05:00
Dan Bucholtz
2153940de8 chore(changelog): update to 3.5.1
update to 3.5.1
2017-07-13 09:48:16 -05:00
Mike Hartington
6d8da0ae32 chore(generator): remove ionicPage for now (#12347) 2017-07-13 09:47:23 -05:00
Pranjal Goswami
347c260950 docs(events): fix syntax error (#12317)
Need to access member using `this` keyword outside constructor
2017-07-13 10:25:35 -04:00
Dan Bucholtz
9ffc52b582 chore(dependencies): recreate lockfile with npm 5.1 2017-07-12 11:30:12 -05:00
Roope Hakulinen
08be9dc58b fix(navigation): ts2.4 compatibility
Closes #12233. Closes #12235
2017-07-10 15:29:25 -04:00
Manuel Mtz-Almeida
ad25cd1cd7 fix(select): not activated on enter in input field
fixes #12202
2017-07-10 13:23:19 +02:00
Jan Piotrowski
693c1c56d1 docs(content): type Sroll => Scroll (#12281) 2017-07-10 13:12:13 +02:00
Manu MA
b5aa304e7e fix(sliding-item): ionSwipe event is fired (#12157)
fixes #12146
2017-07-10 12:58:52 +02:00
Dan Bucholtz
3e3a00b2fb chore(lockfile): idk why this thing keeps updating 2017-07-06 13:01:44 -05:00
jgw96
923e3b2e26 chore(build): import spawnSync from correct package 2017-07-06 12:42:52 -05:00
jgw96
e079f7777f chore(build): use cross-spawn instead of spawn 2017-07-06 12:40:04 -05:00
jgw96
5a4b351794 chore(build): remove linting checks we do not want for dist 2017-07-06 12:08:25 -05:00
Dan Bucholtz
d22d77b485 fix(navigation): restore getActiveChildNav method to maintain old API, add deprecation notice 2017-07-05 23:45:38 -05:00
Dan Bucholtz
efd54750bf chore(lint): fix all code that doesn't pass tslint
* chore(lint): update to work with newer tslint

* chore(lint): fix all code that doesnt pass tslint

fix all code that doesnt pass tslint
2017-07-05 16:21:55 -05:00
Dan Bucholtz
eb830d4202 chore(app): fix linting issues
fix linting issues
2017-07-03 14:37:46 -05:00
Dan Bucholtz
3f39e14f76 fix(tabs): have tabs behavior match nav when navigating back/forth via the url 2017-07-03 14:31:03 -05:00
Dan Bucholtz
fce4422ab1 fix(navigation): navs can have n child navs instead of just one 2017-06-30 14:59:55 -05:00
Dan Bucholtz
04e78d8c22 fix(navigation): fix swipe-to-go-back
fix swipe-to-go-back
2017-06-30 11:34:08 -05:00
Dan Bucholtz
48b3243689 fix(navigation): mark as not transitioning on success in addition to '_transitionFinish', provide no
mark as not transitioning on success in addition to '_transitionFinish', provide note as to why we
want it in both places
2017-06-29 15:23:26 -05:00
Dan Bucholtz
486bff036d feat(navigation): support for named ion-nav/ion-tabs to improve url in the short term
support for named ion-nav/ion-tabs to improve url in the short term
2017-06-29 14:50:56 -05:00
Dan Bucholtz
a7e5fa7ea7 chore(dependencies): lock file updated 2017-06-28 15:16:58 -05:00
Dan Bucholtz
5771543c3b chore(dependencies): update app-scripts to 1.3.11, add npm 5 support
update app-scripts to 1.3.11, add npm 5 support
2017-06-28 15:12:35 -05:00
Dan Bucholtz
048af1b329 chore(changelog): additional nav change details
additional nav change details
2017-06-28 14:10:53 -05:00
Dan Bucholtz
a92d805e89 chore(changelog): 3.5.0 changelog 2017-06-28 11:59:04 -05:00
Manuel Mtz-Almeida
8dc08f9c1f fix(select): _inputUpdated should not be called manually 2017-06-28 17:23:54 +02:00
mhartington
bc7bb21f1a docs(menu): fix link to menucontroller 2017-06-28 11:04:09 -04:00
Dan Bucholtz
016b90da47 fix(tabs): use segment if it exists even if component exists 2017-06-27 14:20:17 -05:00
Dan Bucholtz
0f5c47db15 feature(navigation): better browser back/forward button support
* test(nav): add third page to nav/simple-nav

* progress

* workin'

* updates

* updates
2017-06-27 07:16:49 -05:00
Jan Piotrowski
86495e111d docs(api): angularjs to angular
Closes #12101
2017-06-23 10:54:10 -04:00
Dan Bucholtz
fba6ff0638 add href for additional testing 2017-06-20 15:18:00 -05:00
Dan Bucholtz
30f69c8a16 fix(navigation): fallback to name if component does not exist on segment 2017-06-20 14:51:38 -05:00
Dan Bucholtz
1beef75c80 refactor(navigation): refactor nav-controller-base to maintain backwards compatibility 2017-06-20 13:26:22 -05:00
Dan Bucholtz
58e1d79518 refactor(app): refactor app slightly to maintain backwards compatibility 2017-06-20 13:26:02 -05:00
Dan Bucholtz
0480f73f8e chore(nav): fix lint errors in test 2017-06-20 10:28:21 -05:00
Dan Bucholtz
f39c3811c5 fix(navigation): add isTab check to getSegmentsFromNav 2017-06-20 10:22:49 -05:00
Brandy Carney
6f7acdbddf docs(changelog): fix broken commit links 2017-06-20 10:29:02 -04:00
Dan Bucholtz
bcc85d9144 chore(build): fix path issue in snapshot test 2017-06-19 16:40:44 -05:00
Dan Bucholtz
00fbded168 chore(build): strictly enforce metadata 2017-06-19 16:40:23 -05:00
Dan Bucholtz
5cad96570f feature(navigation): modify urls to support multiple root level navs/tabs
* wip

* wip

* progress

* wippy skippy

* getting there

* all tests passing except goBack

* unit tests pass again boi

* goBack tests pass

* great success

* the good stuff
2017-06-19 16:29:55 -05:00
Manu Mtz.-Almeida
e3a8d27ec1 fix(select): floating label
fixes #12068
2017-06-19 19:41:17 +02:00
Brandy Carney
d8b65da6ac chore(ionic): release 3.4.2 2017-06-16 13:25:23 -04:00
Brandy Carney
70b5b6b5e5 fix(rtl): use multi direction in order to override the default ltr 2017-06-16 13:10:13 -04:00
Brandy Carney
5094feec89 chore(ionic): release 3.4.1 2017-06-16 12:19:45 -04:00
Brandy Carney
1ca7df75ed fix(themes): change default app-direction 2017-06-16 12:05:22 -04:00
Dan Bucholtz
877d8211d5 chore(changelog): fix typo, update deps to latest 2017-06-15 21:53:49 -05:00
Louis Orleans
a8731dfc98 fix(tabs): properly align tabs highlight (#11619)
When `Tabs` are nested within each other, the highlight can get
misaligned. This prevents that by ensuring the affected
`.tab-highlight` is a direct child of the targeted `Tabs`.
2017-06-15 23:39:26 +02:00
Manuel Mtz-Almeida
7803998542 style(reorder): using const 2017-06-15 22:56:32 +02:00
Manu Mtz.-Almeida
8bd2f24d06 perf(item): button-effect is hidden for non buttons 2017-06-15 22:44:53 +02:00
Amit Moryossef
63f728f517 feat(item-reorder): add side support (#11642)
fixes #11637
2017-06-15 22:34:30 +02:00
Manuel Mtz-Almeida
61935602a1 fix(sliding-item): super slow device does get correct classes
fixes #11988
2017-06-15 21:58:33 +02:00
Dan Bucholtz
1a4aacf8be chore(changelog): add upgrade instructions for 3.4.0 2017-06-15 14:53:25 -05:00
Manuel Mtz-Almeida
5a5da39a1e fix(highlight): selected tab might be null
fixes #12054
2017-06-15 21:22:55 +02:00
Zachary Keeton
c7645ee59d feat(select): add compareWith Input for object value comparison (#11965)
fixes #6625
2017-06-15 20:12:56 +02:00
Manu MA
2743c63537 refactor(overlay): simplify focusOutActiveElement (#12023) 2017-06-15 20:09:34 +02:00
Manu MA
7a1342caa1 fix(input): prevent duplicated tabIndex (#12043)
fixes #7178
2017-06-15 20:08:25 +02:00
Dan Bucholtz
3564bcfe1b chore(github): update issue template plunkr to 3.4.0 version 2017-06-15 09:46:06 -05:00
Dan Bucholtz
f149c5ee95 chore(dependencies): update package version to 3.4.0 2017-06-15 09:35:21 -05:00
Dan Bucholtz
2791c40c29 chore(changelog): 3.4.0 release 2017-06-15 09:35:02 -05:00
Job
54ac2e393f fix(input): slightly longer delay for autofocus (#12037) 2017-06-14 15:09:23 +02:00
Manuel Mtz-Almeida
dc958c3e2c fix(textarea): apply classes properly 2017-06-13 17:26:04 +02:00
Manuel Mtz-Almeida
9f86e10f46 fix(input): better handling of attributes 2017-06-13 14:18:03 +02:00
Job
8041eedf22 fix(input): use all supported attributes on both textareas and inputs (#12028) 2017-06-13 12:15:51 +02:00
Manuel Mtz-Almeida
ef85ba6c1f fix(input): add correct translate3d for rtl
thanks @Khalid-Nowaf

fixes #11745
fixes #11211
2017-06-12 23:17:48 +02:00
Manuel Mtz-Almeida
6dee17b89b Merge branch 'keyboard-fixes' 2017-06-12 22:49:13 +02:00
Manuel Mtz-Almeida
c10f72b1e2 fix(keyboard): big keyboard/input refactor
fixes #9699
fixes #11484
fixes #11389
fixes #11325
fixes #11291
fixes #10828
fixes #11291
fixes #10393
fixes #10257
fixes #9434
fixes #8933
fixes #7178
fixes #7047
fixes #10552
fixes #10393
fixes #10183
fixes #10187
fixes #10852
fixes #11578
2017-06-12 22:31:22 +02:00
Job
47e3c70bf3 fix(refresher): border should only show when pulled (#12015)
fixes #10994
2017-06-12 21:05:57 +02:00
Brandy Carney
a91a68e198 style(util): remove commented out test css 2017-06-12 13:51:26 -04:00
3564 changed files with 147306 additions and 146028 deletions

View File

@@ -70,7 +70,21 @@ Please see our [Contributor Code of Conduct](https://github.com/ionic-team/ionic
#### Adding Documentation
1. To add or modify API Documentation for a component, it should be added/changed in the `readme.md` file in the component's directory. If the updates are to a specific `@Prop`, `@Event` or `@Method`, then please make the changes to the component's TypeScript (`*.ts`). Properties, events and methods information within the `readme.md` file are auto generated directly from the JSDoc comments within the TypeScript file.
1. To add or modify API Documentation for a component, it should be added/changed in the component's TypeScript (`*.ts`) file, prior to the Class definition. For example, `Badge` looks similar to this:
```
/**
* @name Badge
* @module ionic
* @description
* Badges are simple components in Ionic containing numbers or text.
*
* @see {@link /docs/v2/components/#badges Badges Component Docs}
* @demo /docs/v2/demos/badge/
**/
```
where `@name` is the Class name, `@description` is the description displayed on the documentation page, `@see` links to any related pages, and `@demo` links to the API demo located in the `demos` folder.
2. In order to run API documentation locally, you will need to clone the `ionic-site` repo as a sibling to the `ionic` repo and then run it: https://github.com/ionic-team/ionic-site#local-build
3. Then, run `gulp docs` in the `ionic` repo every time you make a change and the site will update.
4. If the change affects the component documentation, create an issue on the `ionic-site` repo: https://github.com/ionic-team/ionic-site/issues

View File

@@ -1,12 +1,18 @@
<!-- 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) -->
**Ionic version:** (check one with "x")
[ ] **1.x** (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] **2.x**
[ ] **3.x**
[ ] **4.x**
**I'm submitting a ...** (check one with "x")
[ ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Please do not submit support requests or "How to" questions here. Instead, please use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
**Current behavior:**
<!-- Describe how the bug manifests. -->
@@ -15,17 +21,22 @@
<!-- Describe what the behavior would be without the bug. -->
**Steps to reproduce:**
<!-- If you are able to illustrate the bug or feature request with an example, please provide steps to reproduce and if possible a demo using one of the following templates:
For Ionic V1 issues - http://plnkr.co/edit/Xo1QyAUx35ny1Xf9ODHx?p=preview
For Ionic issues - http://plnkr.co/edit/z0DzVL?p=preview
-->
<!-- Please explain the steps required to duplicate the issue, especially if you are able to provide a sample application. -->
**Related code:**
<!-- If you are able to illustrate the bug or feature request with an example, please provide a sample application via one of the following means:
A sample application via GitHub
StackBlitz (https://stackblitz.com)
Plunker (http://plnkr.co/edit/cpeRJs?p=preview)
-->
```
insert any relevant code here
insert short code snippets here
```
**Other information:**

View File

@@ -1,29 +0,0 @@
triage:
label: triage
dryRun: false
support:
label: support
message: >
Thanks for the issue! This issue appears to be a support request. We use this issue tracker exclusively for
bug reports and feature requests. Please use our [forum](https://forum.ionicframework.com) or our
[slack channel](https://ionicworldwide.herokuapp.com/) for questions about the framework.
Thank you for using Ionic!
close: true
lock: true
dryRun: false
incomplete:
label: missing template
message: >
Thanks for the issue! It appears that you have not filled out the provided issue template. We use this issue
template in order to gather more information and further assist you. Please create a new issue and ensure the
template is fully filled out.
Thank you for using Ionic!
close: true
lock: true
dryRun: false

6
.gitignore vendored
View File

@@ -9,17 +9,15 @@ log.txt
*.sublime-workspace
.idea/
.sourcemaps/
.vscode/
.sass-cache/
.versions/
coverage/
collection/
dist/
node_modules/
tmp/
temp/
packages/core/theme-builder/
packages/core/test-components/
$RECYCLE.BIN/
.DS_Store
@@ -34,8 +32,6 @@ scripts/e2e/webpackEntryPoints.json
scripts/build/e2e-generated-tsconfig.json
*.css.ts
stencil-stats.json
# demo stuff
demos/node_modules
demos/polyfills

View File

@@ -4,16 +4,12 @@
plugin_directories: ['.scss-linters']
scss_files: 'src/**/*.scss'
exclude:
- 'src/themes/ionic.mixins.scss'
- 'src/themes/license.scss'
- 'src/themes/normalize.scss'
- 'src/themes/util.scss'
- 'src/themes/version.scss'
- 'src/platform/cordova.*.scss'
- 'src/components/slides/slides-vendor.scss'
linters:
@@ -39,12 +35,9 @@ linters:
# Box
- box-sizing
- position
- top
- right
- bottom
- left
- z-index
- display
- overflow
@@ -114,13 +107,10 @@ linters:
- font
- font-family
- font-size
- -moz-osx-font-smoothing
- -webkit-font-smoothing
- font-smooth
- font-smoothing
- font-style
- font-variant
- font-weight
- src
- letter-spacing
- line-height

View File

@@ -1,908 +0,0 @@
# Breaking Changes
A list of the breaking changes introduced in Ionic Angular v4.
- [Dynamic Mode](#dynamic-mode)
- [Button](#button)
- [Chip](#chip)
- [Colors](#colors)
- [Datetime](#datetime)
- [FAB](#fab)
- [Fixed Content](#fixed-content)
- [Icon](#icon)
- [Input](#Input)
- [Item](#item)
- [Item Divider](#item-divider)
- [Item Sliding](#item-sliding)
- [List Header](#list-header)
- [Menu Toggle](#menu-toggle)
- [Nav](#nav)
- [Option](#option)
- [Radio](#radio)
- [Range](#range)
- [Segment](#segment)
- [Select](#select)
- [Text/Typography](#text-typography)
- [Theming](#theming)
- [Toolbar](#toolbar)
## Dynamic Mode
Components are no longer able to have their mode changed dynamically. You can change the mode before the first render, but after that it will not style properly because only the initial mode's styles are included.
## Button
### Markup Changed
Button should now be written as an `<ion-button>` element. Ionic will determine when to render an anchor tag based on the presence of an `href` attribute.
**Old Usage Example:**
```html
<button ion-button (click)="doSomething()">
Default Button
</button>
<a ion-button href="#">
Default Anchor
</a>
```
**New Usage Example:**
```html
<ion-button (click)="doSomething()">
Default Button
</ion-button>
<ion-button href="#">
Default Anchor
</ion-button>
```
### Attributes Renamed
Previously to style icons inside of a button the following attributes were used: `icon-left`, `icon-right`, (and with the added support of RTL) `icon-start`, `icon-end`.
These have been renamed to the following, and moved from the button element to the icon itself:
| Old Property | New Property | Property Behavior |
|---------------------------|----------------|-----------------------------------------------------------------------|
| `icon-left`, `icon-start` | `slot="start"` | Positions to the left of the button in LTR, and to the right in RTL. |
| `icon-right`, `icon-end` | `slot="end"` | Positions to the right of the button in LTR, and to the left in RTL. |
In addition, several sets of mutually exclusive boolean attributes have been combined into a single string attribute.
The `small` and `large` attributes are now combined under the `size` attribute. The `clear`, `outline`, and `solid` attributes have been combined under `fill`. And, lastly, the `full` and `block` attributes have been combined under `expand`.
| Old Property | New Property | Property Behavior |
| --------------------------- | ------------ | --------------------------- |
| `small`, `large` | `size` | Sets the button size. |
| `clear`, `outline`, `solid` | `fill` | Sets the button fill style. |
| `full`, `block`             | `expand` | Sets the button width. |
**Old Usage Example:**
```html
<ion-button icon-left>
<ion-icon name="home"></ion-icon>
Icon Left
</ion-button>
<ion-button icon-start>
<ion-icon name="home"></ion-icon>
Icon Left on LTR, Right on RTL
</ion-button>
<ion-button icon-right>
Icon Right
<ion-icon name="home"></ion-icon>
</ion-button>
<ion-button icon-end>
Icon Right on LTR, Left on RTL
<ion-icon name="home"></ion-icon>
</ion-button>
<ion-button large>
Large Button
</ion-button>
<ion-button outline>
Outline Button
</ion-button>
<ion-button full>
Full-width Button
</ion-button>
```
**New Usage Example:**
```html
<ion-button>
<ion-icon slot="start" name="home"></ion-icon>
Icon Left on LTR, Right on RTL
</ion-button>
<ion-button>
Icon Right on LTR, Left on RTL
<ion-icon slot="end" name="home"></ion-icon>
</ion-button>
<ion-button size="large">
Large Button
</ion-button>
<ion-button fill="outline">
Outline Button
</ion-button>
<ion-button expand="full">
Full-width Button
</ion-button>
```
## Chip
### Markup Changed
Buttons inside of an `<ion-chip>` container should now be written as an `<ion-chip-button>` element. Ionic will determine when to render an anchor tag based on the presence of an `href` attribute.
**Old Usage Example:**
```html
<ion-chip>
<ion-label>Default</ion-label>
<ion-button clear color="light">
<ion-icon name="close-circle"></ion-icon>
</ion-button>
</ion-chip>
```
**New Usage Example:**
```html
<ion-chip>
<ion-label>Default</ion-label>
<ion-chip-button fill="clear" color="light">
<ion-icon name="close-circle"></ion-icon>
</ion-chip-button>
</ion-chip>
```
## Colors
The default Ionic theme colors have changed. Previously we had:
```
primary: #327eff
secondary: #32db64
danger: #f53d3d
light: #f4f4f4
dark: #222
```
Some of their values have changed and we now include more colors by default:
```
primary: #3880ff
secondary: #0cd1e8
tertiary: #7044ff
success: #10dc60
warning: #ffce00
danger: #f04141
light: #f4f5f8
medium: #989aa2
dark: #222428
```
The `secondary` color saw the largest change. If you were previously using our `secondary` color we recommend switching to `success` instead.
## Datetime
The Datetime classes and interfaces have changed capitalization from `DateTime` to `Datetime`. This is more consistent with other components and their tags.
**Old Usage Example:**
```javascript
import { DateTime } from 'ionic-angular';
```
**New Usage Example:**
```javascript
import { Datetime } from 'ionic-angular';
```
## FAB
### Markup Changed
Buttons inside of an `<ion-fab>` container should now be written as an `<ion-fab-button>` element. Ionic will determine when to render an anchor tag based on the presence of an `href` attribute.
**Old Usage Example:**
```html
<ion-fab top right edge>
<button ion-fab>
<ion-icon name="add"></ion-icon>
</button>
<ion-fab-list>
<button ion-fab>
<ion-icon name="logo-facebook"></ion-icon>
</button>
<button ion-fab>
<ion-icon name="logo-twitter"></ion-icon>
</button>
<button ion-fab>
<ion-icon name="logo-vimeo"></ion-icon>
</button>
<button ion-fab>
<ion-icon name="logo-googleplus"></ion-icon>
</button>
</ion-fab-list>
</ion-fab>
```
**New Usage Example:**
```html
<ion-fab top right edge>
<ion-fab-button>
<ion-icon name="add"></ion-icon>
</ion-fab-button>
<ion-fab-list>
<ion-fab-button>
<ion-icon name="logo-facebook"></ion-icon>
</ion-fab-button>
<ion-fab-button>
<ion-icon name="logo-twitter"></ion-icon>
</ion-fab-button>
<ion-fab-button>
<ion-icon name="logo-vimeo"></ion-icon>
</ion-fab-button>
<ion-fab-button>
<ion-icon name="logo-googleplus"></ion-icon>
</ion-fab-button>
</ion-fab-list>
</ion-fab>
```
### Fixed Content
The `<ion-fab>` container was previously placed inside of the fixed content by default. Now, any fixed content should go inside of the `<ion-fixed>` container.
**Old Usage Example:**
```html
<ion-content>
<ion-fab top right edge>
<!-- fab buttons and lists -->
</ion-fab>
Scrollable Content
</ion-content>
```
**New Usage Example:**
```html
<ion-fixed>
<ion-fab top right edge>
<!-- fab buttons and lists -->
</ion-fab>
</ion-fixed>
<ion-content>
Scrollable Content
</ion-content>
```
## Icon
### Fonts Removed
Icons have been refactored to use SVGs instead of fonts. Ionic will only fetch the SVG for the icon when it is needed, instead of having a large font file that is always loaded in.
If any `CSS` is being overridden for an icon it will need to change to override the SVG itself. Below is a usage example of the differences in changing the icon color.
**Old Usage Example:**
```css
.icon {
color: #000;
}
```
**New Usage Example:**
```css
.icon {
fill: #000;
}
```
### Property Removed
The `isActive` property has been removed. It only worked for `ios` icons previously. If you would like to switch between an outline and solid icon you should set it in the `name`, or `ios`/`md` attribute and then change it when needed.
## Input
The Sass variables were all renamed from having `$text-input` as the prefix to `$input`.
**Old Usage Example:**
```css
$text-input-highlight-color-valid: #32db64;
```
**New Usage Example:**
```css
$input-highlight-color-valid: #32db64;
```
## Item
### Markup Changed
Item should now be written as an `<ion-item>` element. Ionic will determine when to render an anchor tag based on the presence of an `href` attribute, and a button tag based on the presence of an `onclick` or `tappable` attribute. Otherwise, it will render a div.
**Old Usage Example:**
```html
<ion-item>
Default Item
</ion-item>
<button ion-item (click)="doSomething()">
Button Item
</button>
<a ion-item href="#">
Anchor Item
</a>
```
**New Usage Example:**
```html
<ion-item>
Default Item
</ion-item>
<ion-item tappable (click)="doSomething()">
Button Item
</ion-item>
<ion-item href="#">
Anchor Item
</ion-item>
```
### Label Required
Previously an `ion-label` would automatically get added to an `ion-item` if one wasn't provided. Now an `ion-label` should always be added if the component is used to display text.
```html
<ion-item>
<ion-label>Item Label</ion-label>
</ion-item>
```
### Attributes Renamed
Previously to position elements inside of an `ion-item` the following attributes were used: `item-left`, `item-right`, (and with the added support of RTL) `item-start`, `item-end`.
These have been renamed to the following:
| Old Property | New Property | Property Behavior |
|---------------------------|----------------|---------------------------------------------------------------------|
| `item-left`, `item-start` | `slot="start"` | Positions to the left of the item in LTR, and to the right in RTL. |
| `item-right`, `item-end` | `slot="end"` | Positions to the right of the item in LTR, and to the left in RTL. |
**Old Usage Example:**
```html
<ion-item>
<div item-left>Left</div>
<ion-label>Item Label</ion-label>
<div item-right>Right</div>
</ion-item>
<ion-item>
<div item-start>Left on LTR, Right on RTL</div>
<ion-label>Item Label</ion-label>
<div item-end>Right on LTR, Left on RTL</div>
</ion-item>
```
**New Usage Example:**
```html
<ion-item>
<div slot="start">Left on LTR, Right on RTL</div>
<ion-label>Item Label</ion-label>
<div slot="end">Right on LTR, Left on RTL</div>
</ion-item>
```
### Detail Push
The attributes to show/hide the detail arrows on items have been converted to a single property and value. Instead of writing `detail-push` or `detail-none` to show/hide the arrow, it should be written `detail`/`detail="true"` or `detail="false"`.
**Old Usage Example:**
```html
<button ion-item detail-none>
<ion-label>Item Label</ion-label>
</button>
<ion-item detail-push>
<ion-label>Item Label</ion-label>
</ion-item>
```
**New Usage Example:**
```html
<ion-item tappable detail="false">
<ion-label>Item Label</ion-label>
</ion-item>
<ion-item detail>
<ion-label>Item Label</ion-label>
</ion-item>
```
By default, items that render buttons or anchor tags will show the arrow in `ios` mode.
## Item Divider
### Label Required
Previously an `ion-label` would automatically get added to an `ion-item-divider` if one wasn't provided. Now an `ion-label` should always be added if the component is used to display text.
```html
<ion-item-divider>
<ion-label>Item Divider Label</ion-label>
</ion-item-divider>
```
## List Header
### Label Required
Previously an `ion-label` would automatically get added to an `ion-list-header` if one wasn't provided. Now an `ion-label` should always be added if the component is used to display text.
```html
<ion-list-header>
<ion-label>List Header Label</ion-label>
</ion-list-header>
```
## Menu Toggle
### Markup Changed
The `menuToggle` attribute should not be added to an element anymore. Elements that should toggle a menu should be wrapped in an `ion-menu-toggle` element.
**Old Usage Example:**
```html
<button ion-button menuToggle>
Toggle Menu
</button>
```
**New Usage Example:**
```html
<ion-menu-toggle>
<ion-button>
Toggle Menu
</ion-button>
</ion-menu-toggle>
```
## Item Sliding
### Markup Changed
The option component should not be written as a `button` with an `ion-button` directive anymore. It should be written as an `ion-item-option`. This will render a native button element inside of it.
**Old Usage Example:**
```html
<ion-item-sliding>
<ion-item>
Item 1
</ion-item>
<ion-item-options side="right">
<button ion-button expandable>
<ion-icon name="star"></ion-icon>
</button>
</ion-item-options>
</ion-item-sliding>
```
**New Usage Example:**
```html
<ion-item-sliding>
<ion-item>
<ion-label>Item 1</ion-label>
</ion-item>
<ion-item-options side="right">
<ion-item-option expandable>
<ion-icon name="star"></ion-icon>
</ion-item-option>
</ion-item-options>
</ion-item-sliding>
```
### Method Renamed
The `getSlidingPercent` method has been renamed to `getSlidingRatio` since the function is returning a ratio of the open amount of the item compared to the width of the options.
## Toolbar
Previously if a `menuToggle` directive was added to an Ionic `button` in a toolbar, it would be positioned outside of the `ion-buttons` element. Since menu toggle is simply a wrapper to a button now, it should be placed inside of the `ion-buttons` element.
**Old Usage Example:**
```html
<ion-toolbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>Left side menu toggle</ion-title>
</ion-toolbar>
```
**New Usage Example:**
```html
<ion-toolbar>
<ion-buttons slot="start">
<ion-menu-toggle>
<ion-button>
<ion-icon slot="icon-only" name="menu"></ion-icon>
</ion-button>
</ion-menu-toggle>
</ion-buttons>
<ion-title>Left side menu toggle</ion-title>
</ion-toolbar>
```
## Nav
### Method renamed
The `remove` method has been renamed to `removeIndex` to avoid conflicts with HTML and be more descriptive as to what it does.
The `getActiveChildNavs` method has been renamed to `getChildNavs`.
## Option
### Markup Changed
Select's option element should now be written as `<ion-select-option>`. This makes it more obvious that the element should only be used with a Select.
**Old Usage Example:**
```html
<ion-select>
<ion-option>Option 1</ion-option>
<ion-option>Option 2</ion-option>
<ion-option>Option 3</ion-option>
</ion-select>
```
**New Usage Example:**
```html
<ion-select>
<ion-select-option>Option 1</ion-select-option>
<ion-select-option>Option 2</ion-select-option>
<ion-select-option>Option 3</ion-select-option>
</ion-select>
```
### Class Changed
The class has been renamed from `Option` to `SelectOption` to keep it consistent with the element tag name.
## Radio
### Slot Required
Previously radio was positioned inside of an item automatically or by using `item-left`/`item-right`. It is now required to have a `slot` to be positioned properly.
** Old Usage Example **
```html
<ion-item>
<ion-label>Apple</ion-label>
<ion-radio value="apple"></ion-radio>
</ion-item>
<ion-item>
<ion-label>Grape, checked, disabled</ion-label>
<ion-radio item-left value="grape" checked disabled></ion-radio>
</ion-item>
<ion-item>
<ion-label>Cherry</ion-label>
<ion-radio item-right color="danger" value="cherry"></ion-radio>
</ion-item>
```
** New Usage Example **
```html
<ion-item>
<ion-label>Apple</ion-label>
<ion-radio slot="start" value="apple"></ion-radio>
</ion-item>
<ion-item>
<ion-label>Grape, checked, disabled</ion-label>
<ion-radio slot="start" value="grape" checked disabled></ion-radio>
</ion-item>
<ion-item>
<ion-label>Cherry</ion-label>
<ion-radio slot="end" color="danger" value="cherry"></ion-radio>
</ion-item>
```
### Radio Group
Radio group has been changed to an element. It should now be wrapped around any `<ion-radio>` elements as `<ion-radio-group>`.
** Old Usage Example **
```html
<ion-list radio-group>
<ion-item>
<ion-label>Apple</ion-label>
<ion-radio value="apple"></ion-radio>
</ion-item>
<ion-item>
<ion-label>Grape, checked, disabled</ion-label>
<ion-radio value="grape" checked disabled></ion-radio>
</ion-item>
<ion-item>
<ion-label>Cherry</ion-label>
<ion-radio color="danger" value="cherry"></ion-radio>
</ion-item>
</ion-list>
```
** New Usage Example **
```html
<ion-list>
<ion-radio-group>
<ion-item>
<ion-label>Apple</ion-label>
<ion-radio slot="start" value="apple"></ion-radio>
</ion-item>
<ion-item>
<ion-label>Grape, checked, disabled</ion-label>
<ion-radio slot="start" value="grape" checked disabled></ion-radio>
</ion-item>
<ion-item>
<ion-label>Cherry</ion-label>
<ion-radio slot="start" color="danger" value="cherry"></ion-radio>
</ion-item>
</ion-radio-group>
</ion-list>
```
## Range
### Attributes Renamed
Previously to place content inside of a range the following attributes were used: `range-left`, `range-right`, (and with the added support of RTL) `range-start`, `range-end`.
These have been renamed to the following:
| Old Property | New Property | Property Behavior |
|-----------------------------|----------------|-----------------------------------------------------------------------|
| `range-left`, `range-start` | `slot="start"` | Positions to the left of the range in LTR, and to the right in RTL. |
| `range-right`, `range-end` | `slot="end"` | Positions to the right of the range in LTR, and to the left in RTL. |
**Old Usage Example:**
```html
<ion-range>
<ion-icon name="sunny" range-left></ion-icon>
<ion-icon name="sunny" range-right></ion-icon>
</ion-range>
<ion-range>
<ion-icon name="sunny" range-start></ion-icon>
<ion-icon name="sunny" range-end></ion-icon>
</ion-range>
```
**New Usage Example:**
```html
<ion-range>
<ion-icon name="sunny" slot="start"></ion-icon>
<ion-icon name="sunny" slot="end"></ion-icon>
</ion-range>
```
## Segment
The markup hasn't changed for Segments, but now writing `<ion-segment-button>` will render a native button element inside of it.
## Select
The `selectOptions` property was renamed to `interfaceOptions` since it directly correlates with the `interface` property.
**Old Usage Example:**
```html
<ion-select [selectOptions]="customOptions">
...
</ion-select>
```
```ts
this.customOptions = {
title: 'Pizza Toppings',
subTitle: 'Select your toppings'
};
```
**New Usage Example:**
```html
<ion-select [interfaceOptions]="customOptions">
...
</ion-select>
```
```ts
this.customOptions = {
title: 'Pizza Toppings',
subTitle: 'Select your toppings'
};
```
## Text / Typography
### Markup Changed
Typography should now be written as an `<ion-text>` element. Previously the `ion-text` attribute could be added to any HTML element to set its color. It should now be used as a wrapper around the HTML elements to style.
**Old Usage Example:**
```html
<h1 ion-text color="secondary">H1: The quick brown fox jumps over the lazy dog</h1>
<h2 ion-text color="primary">H2: The quick brown fox jumps over the lazy dog</h2>
<h3 ion-text color="light">H3: The quick brown fox jumps over the lazy dog</h3>
<p>
I saw a werewolf with a Chinese menu in his hand.
Walking through the <sub ion-text color="danger">streets</sub> of Soho in the rain.
He <i ion-text color="primary">was</i> looking for a place called Lee Ho Fook's.
Gonna get a <a ion-text color="secondary">big dish of beef chow mein.</a>
</p>
```
**New Usage Example:**
```html
<ion-text color="secondary">
<h1>H1: The quick brown fox jumps over the lazy dog</h1>
</ion-text>
<ion-text color="primary">
<h2>H2: The quick brown fox jumps over the lazy dog</h2>
</ion-text>
<ion-text color="light">
<h3>H3: The quick brown fox jumps over the lazy dog</h3>
</ion-text>
<p>
I saw a werewolf with a Chinese menu in his hand.
Walking through the <ion-text color="danger"><sub>streets</sub></ion-text> of Soho in the rain.
He <ion-text color="primary"><i>was</i></ion-text> looking for a place called Lee Ho Fook's.
Gonna get a <ion-text color="secondary"><a>big dish of beef chow mein.</a></ion-text>
</p>
```
## Theming
### Including Sass
Previously all `scss` files in the `src` directory were imported. Now each `scss` file should be included for the component via Angular's `styleUrls` metadata. View [Angular's Component Styles](https://angular.io/guide/component-styles) for more information.
This means that any styles wrapped with a page should now be removed since they will automatically be scoped to the component.
**Old Usage Example:**
```scss
page-schedule {
p {
color: red;
}
}
```
**New Usage Example:**
```scss
p {
color: red;
}
```
### Sass Variables
Sass variables for changing the cordova statusbar have been renamed to app:
**Old Usage Example:**
```css
$cordova-ios-statusbar-padding: 20px;
$cordova-md-statusbar-padding: 20px;
```
**New Usage Example:**
```css
$app-ios-statusbar-padding: 20px;
$app-md-statusbar-padding: 20px;
```
## Toolbar
### Attributes Renamed
The attributes to position an `ion-buttons` element inside of a toolbar have been renamed, as well as the behavior attached to the name. We noticed there was some confusion behind the behavior of the `start` and `end` attributes, and with the new support for RTL we wanted to make the behavior of these match RTL. In order to do this we had to rename the old `start`/`end` to something that makes more sense with their behavior.
The names and behavior of each of the properties was previously:
| Old Property | Property Behavior |
|--------------|--------------------------------------------------------------------------------------------------------------|
| `start` | Positions element to the left of the content in `ios` mode, and directly to the right in `md` and `wp` mode. |
| `end` | Positions element to the right of the content in `ios` mode, and to the far right in `md` and `wp` mode. |
| `left` | Positions element to the left of all other elements. |
| `right` | Positions element to the right of all other elements. |
The properties have been renamed to the following:
| Old Property | New Property | Property Behavior |
|--------------|---------------------|------------------------------------------------------------------------------------------------------------------|
| `start` | `slot="mode-start"` | Positions element to the `left` of the content in `ios` mode, and directly to the `right` in `md` and `wp` mode. |
| `end` | `slot="mode-end"` | Positions element to the `right` of the content in `ios` mode, and to the far right in `md` and `wp` mode. |
| `left` | `slot="start"` | Positions element to the `left` of all other elements in `LTR`, and to the `right` in `RTL`. |
| `right` | `slot="end"` | Positions element to the `right` of all other elements in `LTR`, and to the `left` in `RTL`. |

3289
CHANGELOG.md Normal file
View File

File diff suppressed because it is too large Load Diff

View File

@@ -20,4 +20,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,16 +1,17 @@
[![npm version](https://badge.fury.io/js/ionic-angular.svg)](https://badge.fury.io/js/ionic-angular)
[![Circle CI](https://circleci.com/gh/ionic-team/ionic.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/ionic-team/ionic)
# Ionic
[Ionic](https://ionicframework.com/) is the open-source mobile app development framework that makes it easy to
build top quality native and progressive web apps with web technologies.
Ionic is based on [Web Components](https://www.webcomponents.org/introduction) and comes with many significant performance, usability, and feature improvements over the past versions.
# Packages
- [Core](packages/core/README.md)
- [Ionic Angular](packages/ionic-angular/README.md)
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](https://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.
### Getting Started
@@ -18,7 +19,6 @@ Start a new project by following our quick [Getting Started guide](https://ionic
We would love to hear from you! If you have any feedback or run into issues using our framework, please file
an [issue](https://github.com/ionic-team/ionic/issues/new) on this repository.
### Contributing
Thanks for your interest in contributing! Read up on our guidelines for
@@ -26,22 +26,11 @@ Thanks for your interest in contributing! Read up on our guidelines for
and then look through our issues with a [help wanted](https://github.com/ionic-team/ionic/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
label.
### Examples
The [Ionic Conference App](https://github.com/ionic-team/ionic-conference-app) is a full featured Ionic app.
It is the perfect starting point for learning and building your own app.
### Future Goals
As Ionic components migrate to the web component standard, a goal of ours is to have Ionic components easily work within all of the popular frameworks.
[![npm version](https://badge.fury.io/js/ionic-angular.svg)](https://badge.fury.io/js/ionic-angular)
[![Circle CI](https://circleci.com/gh/ionic-team/ionic.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/ionic-team/ionic)
[![Open Source Helpers](https://www.codetriage.com/ionic-team/ionic/badges/users.svg)](https://www.codetriage.com/ionic-team/ionic)
### Ionic V1
The source code for Ionic V1 has been moved to [ionic-team/ionic-v1](https://github.com/ionic-team/ionic-v1).

View File

@@ -6,6 +6,7 @@ jobs:
- image: node:7
branches:
ignore:
- mono-refactor
- core
steps:
- checkout
@@ -13,7 +14,7 @@ jobs:
key: ionic-site
- run:
name: Prepare ionic-site repo
command: ./packages/ionic-angular/scripts/docs/prepare.sh
command: ./scripts/docs/prepare.sh
- save_cache:
key: ionic-site
paths:
@@ -41,7 +42,7 @@ jobs:
name: Update docs
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
./packages/ionic-angular/scripts/ci/deploy.sh
./scripts/ci/deploy.sh
else
echo "We are on ${CIRCLE_BRANCH} branch, not going to update docs."
fi

View 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;
}

View 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 {}

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,14 @@
<ion-header>
<ion-navbar>
<ion-title>Action Sheet</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<button ion-button block (click)="present()">Basic Action Sheet</button>
</ion-content>

View 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 {}

View File

@@ -0,0 +1,57 @@
import { Component } from '@angular/core';
import { ActionSheetController, Platform } from '../../../../../src';
@Component({
templateUrl: 'page-one.html'
})
export class PageOne {
constructor(public alertCtrl: ActionSheetController, public platform: Platform) { }
present() {
let actionSheet = this.alertCtrl.create({
title: 'Albums',
buttons: [
{
text: 'Delete',
role: 'destructive',
icon: !this.platform.is('ios') ? 'trash' : null,
handler: () => {
console.log('Delete clicked');
}
},
{
text: 'Share',
icon: !this.platform.is('ios') ? 'share' : null,
handler: () => {
console.log('Share clicked');
}
},
{
text: 'Play',
icon: !this.platform.is('ios') ? 'arrow-dropright-circle' : null,
handler: () => {
console.log('Play clicked');
}
},
{
text: 'Favorite',
icon: !this.platform.is('ios') ? 'heart-outline' : null,
handler: () => {
console.log('Favorite clicked');
}
},
{
text: 'Cancel',
role: 'cancel', // will always sort to be on the bottom
icon: !this.platform.is('ios') ? 'close' : null,
handler: () => {
console.log('Cancel clicked');
}
}
]
});
actionSheet.present();
}
}

View 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;
}

View 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 {}

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,18 @@
<ion-header>
<ion-navbar>
<ion-title>Alert</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<button ion-button block (click)="doAlert()">Basic Alert</button>
<button ion-button color="light" block (click)="doConfirm()">Confirm Alert</button>
<button ion-button color="secondary" block (click)="doPrompt()">Prompt Alert</button>
<button ion-button color="danger" block (click)="doRadio()">Radio Alert</button>
<button ion-button color="dark" block (click)="doCheckbox()">Checkbox Alert</button>
</ion-content>

View 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 {}

View File

@@ -0,0 +1,209 @@
import { Component } from '@angular/core';
import { AlertController } from '../../../../../src';
@Component({
templateUrl: 'page-one.html'
})
export class PageOne {
testRadioOpen = false;
testRadioResult: any;
testCheckboxOpen = false;
testCheckboxResult: any;
constructor(public alertCtrl: AlertController) {}
doAlert() {
let alert = this.alertCtrl.create({
title: 'New Friend!',
subTitle: 'Your friend, Obi wan Kenobi, just accepted your friend request!',
buttons: ['Ok']
});
alert.present();
}
doConfirm() {
let alert = this.alertCtrl.create({
title: 'Use this lightsaber?',
message: 'Do you agree to use this lightsaber to do good across the intergalactic galaxy?',
buttons: [
{
text: 'Disagree',
handler: () => {
console.log('Disagree clicked');
}
},
{
text: 'Agree',
handler: () => {
console.log('Agree clicked');
}
}
]
});
alert.present();
}
doPrompt() {
let alert = this.alertCtrl.create({
title: 'Login',
message: 'Enter a name for this new album you\'re so keen on adding',
inputs: [
{
name: 'title',
placeholder: 'Title'
},
],
buttons: [
{
text: 'Cancel',
handler: () => {
console.log('Cancel clicked');
}
},
{
text: 'Save',
handler: () => {
console.log('Saved clicked');
}
}
]
});
alert.present();
}
doRadio() {
let alert = this.alertCtrl.create();
alert.setTitle('Lightsaber color');
alert.addInput({
type: 'radio',
label: 'Blue',
value: 'blue',
checked: true
});
alert.addInput({
type: 'radio',
label: 'Green',
value: 'green'
});
alert.addInput({
type: 'radio',
label: 'Red',
value: 'red'
});
alert.addInput({
type: 'radio',
label: 'Yellow',
value: 'yellow'
});
alert.addInput({
type: 'radio',
label: 'Purple',
value: 'purple'
});
alert.addInput({
type: 'radio',
label: 'White',
value: 'white'
});
alert.addInput({
type: 'radio',
label: 'Black',
value: 'black'
});
alert.addButton('Cancel');
alert.addButton({
text: 'Ok',
handler: (data: any) => {
console.log('Radio data:', data);
this.testRadioOpen = false;
this.testRadioResult = data;
}
});
alert.present();
}
doCheckbox() {
let alert = this.alertCtrl.create();
alert.setTitle('Which planets have you visited?');
alert.addInput({
type: 'checkbox',
label: 'Alderaan',
value: 'value1',
checked: true
});
alert.addInput({
type: 'checkbox',
label: 'Bespin',
value: 'value2'
});
alert.addInput({
type: 'checkbox',
label: 'Coruscant',
value: 'value3'
});
alert.addInput({
type: 'checkbox',
label: 'Endor',
value: 'value4'
});
alert.addInput({
type: 'checkbox',
label: 'Hoth',
value: 'value5'
});
alert.addInput({
type: 'checkbox',
label: 'Jakku',
value: 'value6'
});
alert.addInput({
type: 'checkbox',
label: 'Naboo',
value: 'value6'
});
alert.addInput({
type: 'checkbox',
label: 'Takodana',
value: 'value6'
});
alert.addInput({
type: 'checkbox',
label: 'Tatooine',
value: 'value6'
});
alert.addButton('Cancel');
alert.addButton({
text: 'Okay',
handler: (data: any) => {
console.log('Checkbox data:', data);
this.testCheckboxOpen = false;
this.testCheckboxResult = data;
}
});
alert.present();
}
}

View 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;
}

View 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 {}

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,64 @@
<ion-header>
<ion-navbar>
<ion-title>Button</ion-title>
</ion-navbar>
</ion-header>
<ion-content text-center>
<h4>Colors</h4>
<button ion-button>Default</button>
<button ion-button color="secondary">Secondary</button>
<button ion-button color="danger">Danger</button>
<button ion-button color="light">Light</button>
<button ion-button color="dark">Dark</button>
<h4>Shapes</h4>
<button ion-button full>Full Button</button>
<button ion-button block>Block Button</button>
<button ion-button round>Round Button</button>
<h4>Outlines</h4>
<button ion-button color="secondary" full outline>Outline + Full</button>
<button ion-button color="secondary" block outline>Outline + Block</button>
<button ion-button color="secondary" round outline>Outline + Round</button>
<h4>Icons</h4>
<button ion-button icon-start color="dark">
<ion-icon name="star"></ion-icon>
Left Icon
</button>
<button ion-button icon-end color="dark">
Right Icon
<ion-icon name="star"></ion-icon>
</button>
<button ion-button icon-only color="dark">
<ion-icon name="star"></ion-icon>
</button>
<h4>Sizes</h4>
<button ion-button color="light" large>Large</button>
<button ion-button color="light">Default</button>
<button ion-button color="light" small>Small</button>
</ion-content>

View 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 {}

View File

@@ -0,0 +1,6 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'page-one.html'
})
export class PageOne {}

View 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;
}

View 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 {}

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,76 @@
<ion-header>
<ion-navbar>
<ion-title>Checkbox</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<ion-list>
<ion-item>
<ion-checkbox [(ngModel)]="data.jon"></ion-checkbox>
<ion-label>Jon Snow</ion-label>
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.daenerys" color="vibrant"></ion-checkbox>
<ion-label>Daenerys Targaryen</ion-label>
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.arya" disabled="true"></ion-checkbox>
<ion-label>Arya Stark</ion-label>
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.tyroin" color="secondary"></ion-checkbox>
<ion-label>Tyrion Lannister</ion-label>
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.sansa" color="danger"></ion-checkbox>
<ion-label>Sansa Stark</ion-label>
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.khal"></ion-checkbox>
<ion-label>Khal Drogo</ion-label>
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.cersei" color="dark"></ion-checkbox>
<ion-label>Cersei Lannister</ion-label>
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.stannis"></ion-checkbox>
<ion-label>Stannis Baratheon</ion-label>
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.petyr" disabled="true"></ion-checkbox>
<ion-label>Petyr Baelish</ion-label>
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.hodor" color="dark"></ion-checkbox>
<ion-label>Hodor</ion-label>
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.catelyn" color="secondary"></ion-checkbox>
<ion-label>Catelyn Stark</ion-label>
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.bronn" color="vibrant"></ion-checkbox>
<ion-label>Bronn</ion-label>
</ion-item>
</ion-list>
</ion-content>

View 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 {}

View 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
};
}

View 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;
}

View 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 {}

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,96 @@
<ion-header>
<ion-toolbar>
<ion-title>Chips</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding style="text-align:center">
<h2>Text Chips</h2>
<ion-chip>
<ion-label>Default</ion-label>
</ion-chip>
<ion-chip>
<ion-label color="secondary">Secondary Label</ion-label>
</ion-chip>
<ion-chip>
<ion-label>Another With Longer Text</ion-label>
</ion-chip>
<h2>Color Chips</h2>
<ion-chip color="primary">
<ion-icon name="heart" color="dark"></ion-icon>
<ion-label>Primary</ion-label>
</ion-chip>
<ion-chip color="secondary">
<ion-label color="dark">Secondary w/ Dark label</ion-label>
</ion-chip>
<ion-chip color="danger">
<ion-label>Danger</ion-label>
</ion-chip>
<h2>Icon Chips</h2>
<ion-chip>
<ion-icon name="pin"></ion-icon>
<ion-label>Default</ion-label>
</ion-chip>
<ion-chip>
<ion-label>Secondary</ion-label>
<ion-icon name="pin" color="secondary"></ion-icon>
</ion-chip>
<h2>Avatar Chips</h2>
<ion-chip>
<ion-avatar>
<img src="https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y">
</ion-avatar>
<ion-label>Default</ion-label>
</ion-chip>
<ion-chip>
<ion-label>Right Avatar</ion-label>
<ion-avatar>
<img src="https://gravatar.com/avatar/d249a09fecac4da036d26c5002af2c94?d=identicon&f=y">
</ion-avatar>
</ion-chip>
<h2>Delete Chips</h2>
<ion-chip #chip1>
<ion-label>Default</ion-label>
<button ion-button clear (click)="delete(chip1)">
<ion-icon name="close-circle"></ion-icon>
</button>
</ion-chip>
<ion-chip #chip2>
<ion-icon name="pin" color="primary"></ion-icon>
<ion-label>With Icon</ion-label>
<button ion-button clear (click)="delete(chip2)">
<ion-icon name="close-circle"></ion-icon>
</button>
</ion-chip>
<ion-chip #chip3>
<ion-avatar>
<img src="https://gravatar.com/avatar/83b4748bf7e821165ecccd4c090d96e1?d=identicon&f=y">
</ion-avatar>
<ion-label>With Avatar</ion-label>
<button ion-button clear color="dark" (click)="delete(chip3)">
<ion-icon name="close-circle"></ion-icon>
</button>
</ion-chip>
</ion-content>

View 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 {}

View File

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'page-one.html'
})
export class PageOne {
delete(chip: Element) {
chip.remove();
}
}

View 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);
}
}

View File

@@ -0,0 +1,93 @@
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 () {
var aKeys: any[] = [], oStorage = {};
Object.defineProperty(oStorage, 'getItem', {
value: function (sKey: number) { return sKey ? this[sKey] : null; },
writable: false,
configurable: false,
enumerable: false
});
Object.defineProperty(oStorage, 'key', {
value: function (nKeyId: number) { return aKeys[nKeyId]; },
writable: false,
configurable: false,
enumerable: false
});
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=';
},
writable: false,
configurable: false,
enumerable: false
});
Object.defineProperty(oStorage, 'length', {
get: function () { return aKeys.length; },
configurable: false,
enumerable: false
});
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=';
},
writable: false,
configurable: false,
enumerable: false
});
this.get = function () {
var iThisIndx: number;
for (var sKey in oStorage) {
iThisIndx = aKeys.indexOf(sKey);
if (iThisIndx === -1) {
(oStorage as any).setItem(sKey, (oStorage as any)[sKey]);
} else {
aKeys.splice(iThisIndx, 1);
}
delete (oStorage as any)[sKey];
}
for (aKeys; aKeys.length > 0; aKeys.splice(0, 1)) { (oStorage as any).removeItem(aKeys[0]); }
for (var aCouple: any, iKey: any, nIdx = 0, aCouples = document.cookie.split(/\s*;\s*/); nIdx < aCouples.length; nIdx++) {
aCouple = aCouples[nIdx].split(/\s*=\s*/);
if (aCouple.length > 1) {
(oStorage as any)[iKey = decodeURI(aCouple[0])] = decodeURI(aCouple[1]);
aKeys.push(iKey);
}
}
return oStorage;
};
this.configurable = false;
this.enumerable = true;
} as any)());
}
var CONFIG_DEMO: any = null;
if (window.localStorage.getItem('configDemo')) {
CONFIG_DEMO = JSON.parse(window.localStorage.getItem('configDemo'));
}

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,5 @@
<ion-tabs>
<ion-tab tabTitle="Music" tabIcon="musical-notes" [root]="tabOne"></ion-tab>
<ion-tab tabTitle="Movies" tabIcon="videocam" [root]="tabOne"></ion-tab>
<ion-tab tabTitle="Games" tabIcon="game-controller-b" [root]="tabOne"></ion-tab>
</ion-tabs>

View 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 {}

View 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;
}

View 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>

View 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 {}

View 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();
}
}

View File

@@ -0,0 +1,83 @@
<ion-header>
<ion-navbar>
<ion-title>Config</ion-title>
</ion-navbar>
</ion-header>
<ion-content class="config-demo">
<ion-list>
<ion-item>
<ion-label>Back Button Icon</ion-label>
<ion-select [(ngModel)]="config.backButtonIcon">
<ion-option value="ios-arrow-back">ios-arrow-back</ion-option>
<ion-option value="md-arrow-back">md-arrow-back</ion-option>
<ion-option value="close">close</ion-option>
<ion-option value="heart">heart</ion-option>
<ion-option value="globe">globe</ion-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label>Icon Mode</ion-label>
<ion-select [(ngModel)]="config.iconMode">
<ion-option value="ios">ios</ion-option>
<ion-option value="md">md</ion-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label>Tab Placement</ion-label>
<ion-select [(ngModel)]="config.tabsPlacement">
<ion-option value="bottom">bottom</ion-option>
<ion-option value="top">top</ion-option>
</ion-select>
</ion-item>
</ion-list>
<p class="note">Note: the config will not be updated until you click the button below.</p>
<div padding>
<button ion-button block (click)="load()">
Update Config
</button>
</div>
<p class="note">Any config for your app should be passed as the second argument to <code>IonicModule.forRoot()</code>.</p>
<!-- this has to be formatted weird for pre -->
<pre margin>
&#64;NgModule(&#123;
imports: [
BrowserModule,
IonicModule.forRoot(MyApp, &#123;
backButtonIcon: "{{initialConfig?.backButtonIcon}}"
iconMode: "{{initialConfig?.iconMode}}"
tabsPlacement: "{{initialConfig?.tabsPlacement}}"
&#125;)
]
&#125;)
</pre>
<div padding>
<button ion-button block color="secondary" (click)="push()">
Go to Another Page
</button>
</div>
</ion-content>
<style>
.config-demo pre {
background-color: #f8f8f8;
}
.config-demo .note {
color: #444;
font-style: italic;
margin: 0 16px;
}
</style>

View 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 {}

View 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);
}
}

View 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>

View 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;
}

View 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 {}

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,75 @@
<ion-header>
<ion-navbar>
<ion-title>DateTime</ion-title>
</ion-navbar>
</ion-header>
<ion-content class="outer-content">
<ion-list>
<ion-list-header>Web Release Dates</ion-list-header>
<ion-item>
<ion-label>World Wide Web</ion-label>
<ion-datetime displayFormat="YYYY" min="1981" max="2002" [(ngModel)]="wwwReleased"></ion-datetime>
</ion-item>
<ion-item>
<ion-label>Netscape</ion-label>
<ion-datetime displayFormat="MMMM YY" min="1989" max="2004" [(ngModel)]="netscapeReleased"></ion-datetime>
</ion-item>
<ion-item>
<ion-label>Opera</ion-label>
<ion-datetime displayFormat="DDD DD.MM.YY" min="1990" max="2000" [dayShortNames]="operaShortDay" [(ngModel)]="operaReleased"></ion-datetime>
</ion-item>
<ion-item>
<ion-label>Webkit</ion-label>
<ion-datetime displayFormat="D MMM YYYY" min="1990-02" max="2010-10" [(ngModel)]="webkitReleased"></ion-datetime>
</ion-item>
<ion-item>
<ion-label>Firefox</ion-label>
<ion-datetime displayFormat="MMM DD, YYYY" min="1994-03-14" max="2012-12-09" [(ngModel)]="firefoxReleased"></ion-datetime>
</ion-item>
<ion-item>
<ion-label>Chrome</ion-label>
<ion-datetime displayFormat="DDDD MMM D, YYYY" min="2005" max="2016" [(ngModel)]="chromeReleased"></ion-datetime>
</ion-item>
</ion-list>
<ion-list>
<ion-list-header>World Times</ion-list-header>
<ion-item>
<ion-label>Tokyo</ion-label>
<ion-datetime displayFormat="hh:mm A" [(ngModel)]="tokyoTime"></ion-datetime>
</ion-item>
<ion-item>
<ion-label>Paris</ion-label>
<ion-datetime displayFormat="HH:mm" [(ngModel)]="parisTime"></ion-datetime>
</ion-item>
<ion-item>
<ion-label>Madison</ion-label>
<ion-datetime displayFormat="h:mm a" [(ngModel)]="madisonTime"></ion-datetime>
</ion-item>
</ion-list>
<ion-list>
<ion-list-header>Set Alarm</ion-list-header>
<ion-item>
<ion-label>Alert</ion-label>
<ion-datetime displayFormat="mm" minuteValues="0,15,30,45" [(ngModel)]="alertTime"></ion-datetime>
</ion-item>
</ion-list>
</ion-content>

View 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 {}

View File

@@ -0,0 +1,62 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'page-one.html'
})
export class PageOne {
wwwReleased = '1991';
netscapeReleased = '1994-12-15T13:47:20.789';
operaReleased = '1995-04-15';
webkitReleased = '1998-11-04T11:06Z';
firefoxReleased = '2002-09-23T15:03:46.789';
chromeReleased = '2008-09-02';
tokyoTime: string;
parisTime: string;
madisonTime: string;
alertTime = '10:15';
operaShortDay = [
's\u00f8n',
'man',
'tir',
'ons',
'tor',
'fre',
'l\u00f8r'
];
constructor() {
this.tokyoTime = this.calculateTime('+9');
this.parisTime = this.calculateTime('+1');
this.madisonTime = this.calculateTime('-6');
// If it is Daylight Savings Time
if (this.dst(new Date())) {
this.parisTime = this.calculateTime('+2');
this.madisonTime = this.calculateTime('-5');
}
}
calculateTime(offset: any) {
// create Date object for current location
let d = new Date();
// create new Date object for different city
// using supplied offset
let nd = new Date(d.getTime() + (3600000 * offset));
return nd.toISOString();
}
// Determine if the client uses DST
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: any) {
return today.getTimezoneOffset() < this.stdTimezoneOffset(today);
}
}

View File

@@ -0,0 +1,43 @@
<ion-menu #menu [content]="content">
<ion-header>
<ion-toolbar color="secondary">
<ion-title>Left Menu</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list *ngIf="loggedIn">
<ion-list-header>
Logged in as <b>Administrator</b>
</ion-list-header>
<button ion-item menuClose *ngFor="let p of loggedInPages" (click)="openPage(menu, p)">
<ion-label color="primary">{{p.title}}</ion-label>
</button>
<button ion-item menuToggle>
Close Menu
</button>
</ion-list>
<ion-list *ngIf="!loggedIn">
<ion-list-header>
Please Log In
</ion-list-header>
<button ion-item menuClose *ngFor="let p of loggedOutPages" (click)="openPage(menu, p)">
<ion-label color="primary">{{p.title}}</ion-label>
</button>
<button ion-item menuToggle>
Close Menu
</button>
</ion-list>
</ion-content>
</ion-menu>
<ion-nav id="nav" [root]="root" #content swipeBackEnabled="false"></ion-nav>

View 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(_: 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;
});
}
}

View 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 {}

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,37 @@
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>
Events
</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<h3 margin-left>Login</h3>
<p margin>Click the login button to use the credentials below. Then, toggle the menu to see the menu items change.</p>
<ion-list no-margin>
<ion-item>
<ion-label stacked color="primary">Name</ion-label>
<ion-input [(ngModel)]="user.name" disabled></ion-input>
</ion-item>
<ion-item>
<ion-label stacked color="primary">Username</ion-label>
<ion-input [(ngModel)]="user.username" disabled></ion-input>
</ion-item>
</ion-list>
<div padding>
<button ion-button block (click)="login()">Login</button>
<button ion-button block color="secondary" menuToggle>Toggle Menu</button>
</div>
</ion-content>

View 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 {}

View 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');
}
}

View File

@@ -0,0 +1,23 @@
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>
Events
</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<h3 margin-left>Logout</h3>
<p margin>Click the logout button to logout. Then, toggle the menu to see the menu items change.</p>
<div padding>
<button ion-button block (click)="logout()">Logout</button>
<button ion-button block color="secondary" menuToggle>Toggle Menu</button>
</div>
</ion-content>

View 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 {}

View 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');
}
}

View 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;
}

View 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 {}

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,72 @@
<ion-header>
<ion-toolbar>
<ion-title>Floating Action Buttons</ion-title>
</ion-toolbar>
</ion-header>
<ion-content fullscreen>
<div f></div>
<div f></div>
<div f *ngFor="let a of array"></div>
<ion-fab top right edge #fab1>
<button ion-fab mini (click)="clickMainFAB()"><ion-icon name="add"></ion-icon></button>
<ion-fab-list>
<button ion-fab (click)="openSocial('facebook', fab1)"><ion-icon name="logo-facebook"></ion-icon></button>
<button ion-fab (click)="openSocial('twitter', fab1)"><ion-icon name="logo-twitter"></ion-icon></button>
<button ion-fab (click)="openSocial('vimeo', fab1)"><ion-icon name="logo-vimeo"></ion-icon></button>
<button ion-fab (click)="openSocial('googleplus', fab1)"><ion-icon name="logo-googleplus"></ion-icon></button>
</ion-fab-list>
</ion-fab>
<ion-fab right bottom #fab2>
<button ion-fab color="light"><ion-icon name="arrow-dropleft"></ion-icon></button>
<ion-fab-list side="left">
<button ion-fab (click)="openSocial('facebook', fab2)"><ion-icon name="logo-facebook"></ion-icon></button>
<button ion-fab (click)="openSocial('twitter', fab2)"><ion-icon name="logo-twitter"></ion-icon></button>
<button ion-fab (click)="openSocial('vimeo', fab2)"><ion-icon name="logo-vimeo"></ion-icon></button>
<button ion-fab (click)="openSocial('googleplus', fab2)"><ion-icon name="logo-googleplus"></ion-icon></button>
</ion-fab-list>
</ion-fab>
<ion-fab left top #fab3>
<button ion-fab color="secondary"><ion-icon name="arrow-dropright"></ion-icon></button>
<ion-fab-list side="right">
<button ion-fab (click)="openSocial('facebook', fab3)"><ion-icon name="logo-facebook"></ion-icon></button>
<button ion-fab (click)="openSocial('twitter', fab3)"><ion-icon name="logo-twitter"></ion-icon></button>
<button ion-fab (click)="openSocial('vimeo', fab3)"><ion-icon name="logo-vimeo"></ion-icon></button>
<button ion-fab (click)="openSocial('googleplus', fab3)"><ion-icon name="logo-googleplus"></ion-icon></button>
</ion-fab-list>
</ion-fab>
<ion-fab left bottom #fab4>
<button ion-fab color="dark"><ion-icon name="arrow-dropup"></ion-icon></button>
<ion-fab-list side="top">
<button ion-fab (click)="openSocial('facebook', fab4)"><ion-icon name="logo-facebook"></ion-icon></button>
<button ion-fab (click)="openSocial('twitter', fab4)"><ion-icon name="logo-twitter"></ion-icon></button>
<button ion-fab (click)="openSocial('vimeo', fab4)"><ion-icon name="logo-vimeo"></ion-icon></button>
<button ion-fab (click)="openSocial('googleplus', fab4)"><ion-icon name="logo-googleplus"></ion-icon></button>
</ion-fab-list>
</ion-fab>
<ion-fab center middle #fab5>
<button ion-fab color="danger" (click)="clickMainFAB()"><ion-icon name="md-share"></ion-icon></button>
<ion-fab-list side="top">
<button ion-fab (click)="openSocial('vimeo', fab5)" color="primary"><ion-icon name="logo-vimeo"></ion-icon></button>
</ion-fab-list>
<ion-fab-list side="bottom">
<button ion-fab (click)="openSocial('facebook', fab5)" color="secondary"><ion-icon name="logo-facebook"></ion-icon></button>
</ion-fab-list>
<ion-fab-list side="left">
<button ion-fab (click)="openSocial('googleplus', fab5)" color="light"><ion-icon name="logo-googleplus"></ion-icon></button>
</ion-fab-list>
<ion-fab-list side="right">
<button ion-fab (click)="openSocial('twitter', fab5)" color="dark"><ion-icon name="logo-twitter"></ion-icon></button>
</ion-fab-list>
</ion-fab>
<ion-fab right middle>
<button ion-fab color="danger" (click)="add()"><ion-icon name="add"></ion-icon></button>
</ion-fab>
</ion-content>

View 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 {}

View 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();
}
}

View 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;
}

View 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 {}

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,61 @@
<ion-header>
<ion-navbar>
<ion-title>HideWhen</ion-title>
</ion-navbar>
</ion-header>
<ion-content class="hide-when-demo">
<h5 margin>Hide Icon Per Platform</h5>
<p margin>In this example we're using the <code>hideWhen</code> directive to decide whether to hide an icon based on the platform.</p>
<ion-grid>
<ion-row>
<ion-col text-center>
<ion-icon name="logo-apple" hideWhen="android,windows"></ion-icon>
</ion-col>
<ion-col>
<code> &lt;ion-icon name="logo-apple" hideWhen="android,windows"&gt;&lt;/ion-icon&gt; </code>
</ion-col>
</ion-row>
<ion-row>
<ion-col text-center>
<ion-icon name="logo-android" hideWhen="ios,windows"></ion-icon>
</ion-col>
<ion-col>
<code> &lt;ion-icon name="logo-android" hideWhen="ios,windows"&gt;&lt;/ion-icon&gt; </code>
</ion-col>
</ion-row>
<ion-row>
<ion-col text-center>
<ion-icon name="logo-windows" hideWhen="ios,android"></ion-icon>
</ion-col>
<ion-col>
<code> &lt;ion-icon name="logo-windows" hideWhen="ios,android"&gt;&lt;/ion-icon&gt; </code>
</ion-col>
</ion-row>
</ion-grid>
</ion-content>
<style>
.hide-when-demo ion-col {
background: #f8f8f8;
border: 1px solid #ddd;
margin: 1%;
max-width: 48%;
flex: 0 0 48%;
min-height: 120px;
}
.hide-when-demo code {
background: #f8f8f8;
}
.hide-when-demo ion-icon {
font-size: 100px;
}
</style>

View 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 {}

View File

@@ -0,0 +1,6 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'page-one.html'
})
export class PageOne {}

View 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;
}

View 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 {}

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,77 @@
<ion-header>
<ion-navbar>
<ion-title>Icon</ion-title>
</ion-navbar>
</ion-header>
<ion-content text-center class="icon-demo">
<ion-row>
<ion-col><ion-icon name="ionic" color="primary"></ion-icon></ion-col>
<ion-col><ion-icon name="logo-angular"></ion-icon></ion-col>
<ion-col><ion-icon name="heart" color="danger"></ion-icon></ion-col>
<ion-col><ion-icon name="ionitron" color="primary"></ion-icon></ion-col>
<ion-col><ion-icon name="happy" color="vibrant"></ion-icon></ion-col>
<ion-col><ion-icon name="people"></ion-icon></ion-col>
<ion-col><ion-icon name="person"></ion-icon></ion-col>
<ion-col><ion-icon name="contact"></ion-icon></ion-col>
<ion-col><ion-icon name="apps"></ion-icon></ion-col>
<ion-col><ion-icon name="lock"></ion-icon></ion-col>
<ion-col><ion-icon name="key" color="bright"></ion-icon></ion-col>
<ion-col><ion-icon name="unlock"></ion-icon></ion-col>
<ion-col><ion-icon name="map" color="secondary"></ion-icon></ion-col>
<ion-col><ion-icon name="navigate"></ion-icon></ion-col>
<ion-col><ion-icon name="pin"></ion-icon></ion-col>
<ion-col><ion-icon name="locate"></ion-icon></ion-col>
<ion-col><ion-icon name="mic"></ion-icon></ion-col>
<ion-col><ion-icon name="musical-notes" color="vibrant"></ion-icon></ion-col>
<ion-col><ion-icon name="volume-up"></ion-icon></ion-col>
<ion-col><ion-icon name="microphone"></ion-icon></ion-col>
<ion-col><ion-icon name="cafe" color="bright"></ion-icon></ion-col>
<ion-col><ion-icon name="calculator"></ion-icon></ion-col>
<ion-col><ion-icon name="bus"></ion-icon></ion-col>
<ion-col><ion-icon name="wine" color="danger"></ion-icon></ion-col>
<ion-col><ion-icon name="camera"></ion-icon></ion-col>
<ion-col><ion-icon name="image" color="secondary"></ion-icon></ion-col>
<ion-col><ion-icon name="star" color="bright"></ion-icon></ion-col>
<ion-col><ion-icon name="pin"></ion-icon></ion-col>
<ion-col><ion-icon name="arrow-dropup-circle" color="vibrant"></ion-icon></ion-col>
<ion-col><ion-icon name="arrow-back"></ion-icon></ion-col>
<ion-col><ion-icon name="arrow-dropdown"></ion-icon></ion-col>
<ion-col><ion-icon name="arrow-forward"></ion-icon></ion-col>
<ion-col><ion-icon name="cloud"></ion-icon></ion-col>
<ion-col><ion-icon name="sunny" color="bright"></ion-icon></ion-col>
<ion-col><ion-icon name="umbrella"></ion-icon></ion-col>
<ion-col><ion-icon name="rainy" color="primary"></ion-icon></ion-col>
</ion-row>
</ion-content>
<style>
.icon-demo ion-icon {
font-size: 50px;
}
.icon-demo ion-row {
height: 100%;
flex-wrap: wrap;
}
.icon-demo ion-col {
flex: 0 0 25%;
max-width: 25%;
text-align: center;
padding: 10px 5px;
}
</style>

View 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 {}

View File

@@ -0,0 +1,6 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'page-one.html'
})
export class PageOne {}

View 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;
}

View 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 {}

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,25 @@
<ion-header>
<ion-navbar>
<ion-title>Infinite Scroll</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<ion-list>
<ion-item *ngFor="let item of items">
{{ item }}
</ion-item>
</ion-list>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)" threshold="100px">
<ion-infinite-scroll-content
loadingSpinner="bubbles"
loadingText="Loading more data...">
</ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>

View 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 {}

View 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);
}
});
}
}

View 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',
];
}

View 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;
}

View 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 {}

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,47 @@
<ion-header>
<ion-navbar>
<ion-title>Input</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<ion-list>
<ion-item>
<ion-label color="primary">Inline Label</ion-label>
<ion-input placeholder="Text Input"></ion-input>
</ion-item>
<ion-item>
<ion-label color="primary" fixed>Fixed Label</ion-label>
<ion-input type="tel" placeholder="Tel Input"></ion-input>
</ion-item>
<ion-item>
<ion-input type="number" placeholder="Number Input with no label"></ion-input>
</ion-item>
<ion-item>
<ion-label color="primary" stacked>Stacked Label</ion-label>
<ion-input type="email" placeholder="Email Input"></ion-input>
</ion-item>
<ion-item>
<ion-label color="primary" stacked>Stacked Label</ion-label>
<ion-input type="password" placeholder="Password Input"></ion-input>
</ion-item>
<ion-item>
<ion-label color="primary" floating>Floating Label</ion-label>
<ion-input></ion-input>
</ion-item>
<ion-item>
<ion-input placeholder="Clear Input" clearInput></ion-input>
</ion-item>
</ion-list>
</ion-content>

View 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 {}

View File

@@ -0,0 +1,6 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'page-one.html'
})
export class PageOne {}

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