Compare commits

..

189 Commits

Author SHA1 Message Date
Alan Agius
f1d9368aff fix(ion-button): ion-button on a tag should be excluded (#8250)
fixes #8249
2016-09-28 19:13:31 +02:00
Dan Bucholtz
5fb53fcfd8 chore(changelog): add note about ionic-angular module changes
add note about ionic-angular module changes
2016-09-28 11:51:51 -05:00
Dan Bucholtz
d924a7b209 Rc changelog (#8255)
* chore(changelog): update changelog

update changelog

* chore(changelog): fix links

fix links

* chore(changelog): added storage info

added storage info

* chore(changelog): add note about structure from google doc

add note about structure from google doc
2016-09-28 11:43:12 -05:00
Dan Bucholtz
bd828fa8c6 chore(changelog): update changelog 2016-09-27 22:18:32 -05:00
Dan Bucholtz
248d0c1a9c chore(e2e): add css back to e2e tests where it was missing
add css back to e2e tests where it was missing
2016-09-27 16:48:27 -05:00
Dan Bucholtz
9bfabfc289 chore(demos): copy over all demo assets
copy over all demo assets
2016-09-27 16:16:08 -05:00
Dan Bucholtz
a9ee835130 chore(demos): added entryComponents
added entryComponents
2016-09-27 16:03:39 -05:00
mhartington
09bc55d4df docs(): fix fabList demo path 2016-09-27 16:51:41 -04:00
Dan Bucholtz
93e72e0ce1 chore(demo): popover entryPoint missing
popover entryPoint missing
2016-09-27 15:44:01 -05:00
Dan Bucholtz
f0ac42ef49 chore(build): remove console.debug from prod
remove console.debug from prod
2016-09-27 15:12:59 -05:00
Dan Bucholtz
f36b6e2d56 chore(demos): add a demo for FAB 2016-09-27 13:26:28 -05:00
Dan Bucholtz
c2f9c350de chore(build): tick package version
tick package version
2016-09-27 11:42:17 -05:00
Dan Bucholtz
412a55deef chore(build): dry run part 2
dry run part 2
2016-09-27 11:15:13 -05:00
Dan Bucholtz
ef0175f82a chore(build): rc dry run
rc dry run
2016-09-27 10:50:41 -05:00
mhartington
75175f6388 docs(): update docs 2016-09-27 11:35:30 -04:00
Dan Bucholtz
b3163f1095 chore(build): rename umd bundle to be a valid variable 2016-09-27 02:05:34 -05:00
Dan Bucholtz
a4f7affab1 chore(build): generate umd bundle for plunkr 2016-09-26 23:04:16 -05:00
mhartington
dbfc183cac docs(): update docs 2016-09-26 21:11:54 -04:00
Dan Bucholtz
eb2b879b37 chore(dependencies): pulling out ionicons and ionic-native from behind ionic-angular 2016-09-26 15:33:40 -05:00
Dan Bucholtz
4903bc81e4 chore(dependencies): update ionic-angular dependencies to include compiler-cli 2016-09-26 15:14:47 -05:00
Max Lynch
f817ac0f60 chore(storage): Remove storage. Code moving to @ionic/storage 2016-09-26 13:35:10 -05:00
mhartington
4baa5b1e0c docs(): update docs 2016-09-26 14:28:11 -04:00
mhartington
390522c0e6 chore(demos): remove protractor typings 2016-09-26 12:36:45 -04:00
Manu Mtz.-Almeida
75d552690b fix(ion-fixed): ion-fixed directive is not longer needed 2016-09-26 14:38:10 +02:00
Manu Mtz.-Almeida
b70614b00d fix(fab): colors in speed dial buttons 2016-09-26 14:20:13 +02:00
Adam Bradley
7cf01fbc21 chore(templates): update generator templates 2016-09-26 10:57:21 +01:00
Dan Bucholtz
dc1a59df49 chore(build): tabs template corrections
tabs template corrections
2016-09-25 22:22:10 -05:00
Ramon Henrique Ornelas
0f6ce2857a fix(templates): add template tabs #8207 (#8208) 2016-09-25 22:20:01 -05:00
Adam Bradley
d8ecf16feb refactor(nav): do not auto-add pascal case css class
Previously a css class generated from the JS class name, was
automatically being added to the page element. However, the JS class
name returned is not consistent among all browsers. Instead of
automatically applying a css classname, we now recommend adding a
`selector` to each page component.
2016-09-26 00:40:10 +01:00
Dan Bucholtz
1bf85c4d76 chore(build): update ionic-angular dependencies to match internal discussion 2016-09-25 11:21:59 -05:00
Dan Bucholtz
a2c8243b94 chore(build): change build process to publish es5 w/ es2015 import/export, umd, and pure es2015 versions 2016-09-25 11:21:36 -05:00
Dan Bucholtz
60363b29e9 chore(build): copy templates to ionic-angular
copy templates to ionic-angular
2016-09-23 21:31:23 -05:00
Ramon Henrique Ornelas
e785d02185 chore(docs): fix typo task docs deps (#8165) 2016-09-23 13:44:05 -05:00
Basti Be
43cfea6ee0 docs(menu): fixed broken links for navbar
Closes #8184

Also renamed "NavBar" to "Navbar" to be consistent with the rest of the documentation.
2016-09-23 14:06:34 -04:00
Ramon Henrique Ornelas
86afdcc5a8 docs(events): fix private functions 2016-09-23 13:01:00 -05:00
Brandy Carney
a7315285c5 fix(action-sheet): add icon-left to the button if an icon exists 2016-09-22 22:43:41 -04:00
mattbryan9
e26c425766 fix(navigation): move onWillDismiss and onDidDismiss, add unit tests 2016-09-22 21:37:50 -04:00
Adam Bradley
963e83514f fix(platform): fire platform ready on app init 2016-09-22 14:11:06 -05:00
Dan Bucholtz
56c2388322 chore(build): remove protractor typings
remove protractor typings
2016-09-21 17:10:35 -05:00
perry
474a7b451e chore(CI): new gulp task names for docs 2016-09-21 14:34:53 -05:00
Dan Bucholtz
7043a14b53 chore(build): docs.copyDemos name change
docs.copyDemos name change
2016-09-21 14:34:07 -05:00
Dan Bucholtz
65ba554b38 chore(build): changed docs task name
changed docs task name
2016-09-21 14:25:49 -05:00
mhartington
f62706eaa0 docs(ionFab): clean up docs 2016-09-21 14:37:31 -04:00
Adam Bradley
fd26de511d chore(module): add Events to IonicModule providers 2016-09-21 13:21:07 -05:00
Manu Mtz.-Almeida
c7163a8d26 docs(fab): fab docs WIP 2016-09-21 19:52:56 +02:00
Dan Bucholtz
49168d5459 chore(build): export QueryParam stuff
export QueryParam stuff
2016-09-21 09:45:22 -05:00
Manu Mtz.-Almeida
490a06dd3e feat(fab): update floating action buttons 2016-09-21 09:42:07 -05:00
Dan Bucholtz
83d973b1a8 chore(demos): change dgeni path for demos
change dgeni path for demos
2016-09-20 15:20:04 -05:00
Manu Mtz.-Almeida
14a3ea2ef8 perf(ripple): md ripple effect update to not affect layout 2016-09-20 12:52:21 -05:00
Dan Bucholtz
156223edba chore(build): changes to build site
changes to build site
2016-09-20 12:25:33 -05:00
Dan Bucholtz
0b914ae654 chore(demos): generating polyfills at build time
generating polyfills at build time
2016-09-20 11:25:16 -05:00
Justin Willis
ace4c1c1dc chore(polyfills): add dom polyfills 2016-09-20 10:15:14 -05:00
Dan Bucholtz
bd61ee7279 chore(karma): firefox removed from karma config
firefox removed from karma config
2016-09-20 01:23:59 -05:00
Dan Bucholtz
4c57873c09 chore(build): move to rollup for e2e, move to es6 imports and type definitions
move to rollup for e2e, move to es6 imports and type definitions
2016-09-20 01:02:39 -05:00
Justin Willis
bcec66c67b feat(polyfills): split up code and source polyfill task (#8130)
* feat(polyfills): split up code and source polyfill task

* fix(polyfills): get rid of need for entries argument
2016-09-20 00:27:25 -05:00
Sani Yusuf
11f4f516fc docs(toast): update direction for table placement
The table is actually below not above.
2016-09-19 20:00:19 -05:00
Dan Bucholtz
bd6350f43e chore(demos): scrollbar fixs 2016-09-19 16:23:19 -05:00
Dan Bucholtz
139cf2dd43 chore(build): docs initial 2016-09-19 16:22:51 -05:00
Dan Bucholtz
62deb4033a chore(build): updated to es imports 2016-09-19 16:22:29 -05:00
Dan Bucholtz
da4970e176 chore(build): move back to rxjs instead of es6 rxjs 2016-09-19 16:22:00 -05:00
Max Lynch
c337f0abed Update README.md 2016-09-19 09:29:23 -05:00
Adam Bradley
9fca394bdb chore(polyfill): break DOM polyfills into external file 2016-09-19 08:56:25 -05:00
Adam Bradley
0e8ebe5734 fix(animation): prevent possible raf null errors 2016-09-19 08:43:27 -05:00
mattbryan9
35193c42c4 fix(nav): move null assignment of _onWillDismiss 2016-09-19 08:30:17 -05:00
mattbryan9
001c1c9f2c fix(app): corrected paths to theme from app.scss 2016-09-19 08:27:24 -05:00
Adam Bradley
ca8cc0af2e feat(nav): set default stack history on app init 2016-09-19 08:06:04 -05:00
Manu Mtz.-Almeida
50e445ef5c refactor(): rename some setCssClass to setElementClass 2016-09-18 18:52:12 +02:00
Manu Mtz.-Almeida
47491fb55d fix(item): sliding item events are zone wrapped
fixes #7630
2016-09-17 16:20:31 +02:00
Manu Mtz.-Almeida
1d3d5a185d fix(item): sliding item with icon-only buttons 2016-09-17 16:15:37 +02:00
Manu Mtz.-Almeida
e0c21290c2 fix(item): regression in sliding item introduced by 52ada1c 2016-09-17 15:43:57 +02:00
Manu Mtz.-Almeida
b750e4691c fix(): gulp validate passes successfully 2016-09-17 01:58:40 +02:00
Dan Bucholtz
d9c3b19768 chore(build): add main.html files
add main.html files
2016-09-16 17:39:25 -05:00
Max Lynch
4236d57ad8 chore(docs): DeepLinker docs 2016-09-16 14:41:30 -05:00
Dan Bucholtz
3d3a95f164 chore(build): demos build via gulp
demos build via gulp
2016-09-16 13:59:04 -05:00
Adam Bradley
9d563f5438 fix(urlSerializer): improve findLinkByComponentData 2016-09-16 12:36:43 -05:00
Dan Bucholtz
1158a96288 chore(build): all demos build in ngc w/ 2.0.0
all demos build in ngc w/ 2.0.0
2016-09-16 11:09:09 -05:00
Dan Bucholtz
716e500351 chore(build): leave .metadata.json metadata in the ionic-angular dist
leave .metadata.json metadata in the ionic-angular dist
2016-09-16 10:58:35 -05:00
Dan Bucholtz
7ac1434fba chore(demos): ngc compile 2016-09-16 10:58:35 -05:00
Dan Bucholtz
0d161ac51c chore(demos): update gitignore, clean up app.module.ts build errors
update gitignore, clean up app.module.ts build errors
2016-09-16 10:58:35 -05:00
Dan Bucholtz
c7ce93d9fe chore(demos): convert to aot structure
convert to aot structure
2016-09-16 10:58:35 -05:00
Dan Bucholtz
7a660af187 chore(build): fix demo compile errors, tslint errors
fix demo compile errors, tslint errors
2016-09-16 10:58:35 -05:00
Manu Mtz.-Almeida
70127346c4 fix(nav): setRoot() and setPages() should not animate
This commit also refactors both methods to avoid deduplicate code,
2016-09-16 17:26:09 +02:00
Adam Bradley
c1777c6d18 test(config): fix unit tests 2016-09-16 01:23:04 -05:00
Adam Bradley
7c05d0c0ba fix(di): update dependency injection and default configs 2016-09-16 00:49:09 -05:00
Adam Bradley
1d403b26ed chore(polyfill): fix gulp polyfill references 2016-09-16 00:48:15 -05:00
Adam Bradley
60f8f5b2e7 chore(package): update angular versions 2016-09-16 00:47:31 -05:00
Dan Bucholtz
5ad8395e0c chore(build): remove ngc metadata and other unnecessary stuff from dist
remove ngc metadata and other unnecessary stuff from dist
2016-09-16 00:34:41 -05:00
Dan Bucholtz
5a3cff06ba chore(build): add roll-up and plugins for polyfills, etc
add roll-up and plugins for polyfills, etc
2016-09-16 00:20:59 -05:00
Dan Bucholtz
3710671d79 chore(build): clean up dependencies 2016-09-15 23:50:21 -05:00
Justin Willis
a252388e7f chore(build): generate static polyfills 2016-09-15 23:38:35 -05:00
Adam Bradley
6784f5e744 fix(exports): update module exports 2016-09-14 15:54:24 -05:00
Manu Mtz.-Almeida
8585427fb4 fix(menu): open/close race condition
fixes #7629 #8001
2016-09-14 15:49:11 -05:00
perry
6506cd5982 chore(CI): run TS lint against commits and PRs 2016-09-14 11:16:13 -05:00
perry
4f18ebc84b chore(CI): seeing if npm 3 helps tests succeed 2016-09-14 10:54:51 -05:00
Brandy Carney
9c3e60d76e test(validate): fix validate errors with karma and sass, add button mode karma test 2016-09-13 23:58:08 -04:00
Adam Bradley
f368abee26 test(ion): fix ion tests 2016-09-13 22:16:26 -05:00
Adam Bradley
95bcaca362 chore(module): move all providers to IonicModule 2016-09-13 21:49:26 -05:00
Adam Bradley
5963921655 chore(angular): update to angular 2.0.0-rc.7 2016-09-13 21:48:43 -05:00
Brandy Carney
79e52dde41 chore: fix package.json error 2016-09-13 18:41:04 -04:00
Brandy Carney
0a5ce42b6e chore(polyfills): include polyfills task in compile and e2e 2016-09-13 18:31:23 -04:00
Justin Willis
ce78194207 feat(): add polyfill task
* feat(): polyfills task

* fix(): remove base option

* fix(): minification and small polyfills

* fix(): add readme and new file names

* fix(): change task names

* fix(): naming changes
2016-09-13 18:28:45 -04:00
Adam Bradley
f477aa2391 feat(nav): component url navigation 2016-09-13 17:16:14 -05:00
Dan Bucholtz
7b443dea4c chore(slides): swiper updates 2016-09-13 17:14:28 -05:00
Adam Bradley
ed221eff1d refactor(nav): queue based transitions 2016-09-13 17:13:43 -05:00
Brandy Carney
bc7d328bc0 refactor(components): add color/mode properties 2016-09-13 17:11:38 -05:00
Adam Bradley
52ada1ca6d chore(components): ngmodule updates 2016-09-13 17:07:33 -05:00
Brandy Carney
16df3a4aab refactor(css): update theme imports 2016-09-13 16:57:32 -05:00
Brandy Carney
750cde38e2 refactor(css): scope component css to mode 2016-09-13 16:52:47 -05:00
Adam Bradley
a154d837a0 chore(storage): move storage out of platform 2016-09-13 16:40:13 -05:00
Adam Bradley
93fc30793d style(util): style updates 2016-09-13 15:55:36 -05:00
Adam Bradley
78122c551d refactor(sass): restructure for sass theme updates 2016-09-13 15:54:23 -05:00
Dan Bucholtz
0d55e3c417 chore(tsconfig): tsconfig updates 2016-09-13 15:49:15 -05:00
Adam Bradley
bf2b6abac5 refactor(export): update component/provider exports 2016-09-13 15:48:25 -05:00
Adam Bradley
d7be8a80c0 test(ngmodule): update to ngmodule 2016-09-13 15:44:02 -05:00
Adam Bradley
b8fb9c7c6d style(gestures): style updates 2016-09-13 15:25:30 -05:00
Adam Bradley
88b6524155 refactor(config): provide config setup factory 2016-09-13 15:19:40 -05:00
Adam Bradley
2c1cdce988 style(util): tslint updates 2016-09-13 15:17:55 -05:00
Adam Bradley
a9e0eef1a6 refactor(platform): provide platform setup factory 2016-09-13 15:16:32 -05:00
Dan Bucholtz
8349e855dc chore(package): update dependencies 2016-09-13 15:13:57 -05:00
Adam Bradley
41a7e07651 refactor(transition): create transition controller 2016-09-13 15:12:14 -05:00
Dan Bucholtz
aaa09bb96e chore(karma): update karma scripts 2016-09-13 15:10:29 -05:00
Dan Bucholtz
12c9fd12bd chore(gulp): update gulp scripts 2016-09-13 15:09:39 -05:00
Dan Bucholtz
17fe72e4bc chore(e2e): update e2e scripts 2016-09-13 15:08:25 -05:00
Dan Bucholtz
4260940814 chore(demos): update demo scripts 2016-09-13 15:06:50 -05:00
Adam Bradley
1b65f2d040 chore(tooling): remove unused tooling scripts 2016-09-13 15:06:03 -05:00
Adam Bradley
871944b53e chore(snapshot): update snapshot scripts 2016-09-13 15:04:28 -05:00
Dan Bucholtz
2359437114 chore(generators): update generator scripts 2016-09-13 15:02:41 -05:00
Dan Bucholtz
35e4033343 chore(typings): remove typings directory 2016-09-13 14:59:46 -05:00
Josh Thomas
22034b8ac4 demos(ngmodule): update to ngmodule 2016-09-13 14:54:22 -05:00
ericb
25ff530dcf docs(loading): add returns statement 2016-09-13 11:38:46 -05:00
Brandy Carney
3154cc05f4 style(chip): fix linter errors 2016-09-01 14:52:07 -04:00
Adam Bradley
c1a52678d0 chore: remove guide.md 2016-08-25 23:10:21 -05:00
Justin Willis
96d630e42a chore(translate): add deprecation notice
Please use NG2-Translate instead: http://ionicframework.com/docs/v2/resources/ng2-translate/
2016-08-25 09:38:59 -05:00
Brandy Carney
144ffe3b03 refactor(chip): add color input, remove some styling, move styles to mode files
references #5386
closes #7717
closes #7467
2016-08-24 17:26:14 -04:00
Lee Nathan
0dece7252b feat(chips): finished Component 2016-08-24 17:26:03 -04:00
Lee Nathan
421f637f96 feat(chips): added Chip component 2016-08-24 17:24:32 -04:00
Lee Nathan
57eda7f602 style(chips): fix 'remove chip' styling 2016-08-24 17:23:02 -04:00
Brandy Carney
29758e6705 docs(nav/tabs): update links to use correct URLs
closes driftyco/ionic-site#768
2016-08-24 12:02:15 -04:00
Brandy Carney
2805e654f6 docs(select): fix the links to alert and action sheet API docs 2016-08-23 20:47:51 -04:00
Sergio Leal
66da98dc5f docs: update toolbar.ts (#7830)
Just a typo
2016-08-23 20:40:10 -04:00
Brandy Carney
3e7cf299e5 docs(select): update API docs to describe selectOptions
references #7764
2016-08-23 20:37:25 -04:00
Brandy Carney
b8285b7ba8 refactor(select): rename alertOptions to selectOptions, add ability to pass them for action-sheet
BREAKING CHANGES:

Select’s `alertOptions` input has been renamed to `selectOptions`. It
now allows you to pass options for either the alert or action-sheet
interface. Refer to their documentation for the options each of them
accept.

http://ionicframework.com/docs/v2/api/components/action-sheet/ActionShee
tController/#create
http://ionicframework.com/docs/v2/api/components/alert/AlertController/#
create

fixes #7764
2016-08-23 20:15:49 -04:00
Brandy Carney
8c1662d5e9 test(button): update karma and e2e tests for the new color input 2016-08-23 18:34:55 -04:00
Brandy Carney
55a0257dbc refactor(colors): color should be added as an input instead of directly adding the color to the component
BREAKING CHANGES:

Colors should be passed in the `color` input on components, not added
individually as an attribute on the component.

For example:

```
<ion-tabs primary>
```

Becomes

```
<ion-tabs color=”primary”>
```

Or to bind an expression to color:

```
<ion-navbar [color]="barColor">
   ...
</ion-navbar>
```

```ts
@Component({
  templateUrl: 'build/pages/about/about.html'
})
export class AboutPage {
  barColor: string;

  constructor(private nav: NavController, platform: Platform) {
    this.barColor = platform.is('android') ? 'primary' : 'light';
  }
}
```

Reason for this change:
It was difficult to dynamically add colors to components, especially if
the name of the color attribute was unknown in the template.
This change keeps the css flat since we aren’t chaining color
attributes on components and instead we assign a class to the component
which includes the color’s name.
This allows you to easily toggle a component between multiple colors.
Speeds up performance because we are no longer reading through all of
the attributes to grab the color ones.

references #7467
closes #7087 closes #7401 closes #7523
2016-08-23 17:16:55 -04:00
Max Lynch
7b60e9c601 chore(components): export PickerColumn and options. Fixes #7783 2016-08-22 20:12:44 -05:00
Purusothaman Ramanujam
cc2359b2c8 docs: typo in the documentation (#7813) 2016-08-22 13:03:43 -04:00
Francis Clavette
8f270f4f44 docs(item): fix typo in sliding item docs
ionSiwpe -> ionSwipe
2016-08-20 21:31:38 -05:00
Manu Mtz.-Almeida
26441ecfe3 perf(reorder): reorder icon is display: none by default
references #7651
2016-08-20 15:53:02 +02:00
Manu Mtz.-Almeida
bac9b81e4c Merge remote-tracking branch 'origin/reorder-perf-fix'
# Conflicts:
#	src/components/item/item-reorder.scss
2016-08-20 15:47:40 +02:00
Manu Mtz.-Almeida
f3bb2dc51d fix(reorder): adjust reorder icon style for iOS and MD 2016-08-20 14:20:36 +02:00
Manu Mtz.-Almeida
02667d1644 Merge branch 'patch-1' of https://github.com/btroncone/ionic 2016-08-20 13:37:16 +02:00
Manu Mtz.-Almeida
824f6c8f10 Merge remote-tracking branch 'remotes/origin/feature/reorderAnimations' 2016-08-20 13:31:59 +02:00
TOMA Hadrien
bfd093628a docs(menuController): add param for menuId
Closes #7665
2016-08-19 15:42:03 -04:00
Alex Muramoto
97b57f1b53 Update docs and fix typos (#7776)
* docs(input): fix typo

* docs(scroll): add note about required CSS for scrollY

* docs(config): add swipeBackEnabled to config properties list

* docs(component generator): fix broken link in template comment

* docs(directive generator): fix broken link in template comment
2016-08-18 15:20:25 -04:00
Alex Muramoto
de12a4e905 refactor(virtual-scroll): add console.warn when approxItemHeight is unset 2016-08-18 12:57:27 -05:00
Justin Willis
6fb848cc4a fix(docs): get rid of reference to @Page 2016-08-18 09:26:44 -05:00
Brandy Carney
7ddebdd6a1 test(loading): add test to show setting dynamic content
references #6103
2016-08-17 14:07:43 -04:00
Brandy Carney
d66dda56ae Merge branch 'stonelasley-issue/6103-change-content-of-loading-component' 2016-08-17 13:48:33 -04:00
Brandy Carney
fa754f1110 Merge branch 'issue/6103-change-content-of-loading-component' of https://github.com/stonelasley/ionic into stonelasley-issue/6103-change-content-of-loading-component 2016-08-17 13:48:07 -04:00
Brandy Carney
fe3e9649c0 Merge branch 'jadsalhani-patch-3' 2016-08-17 13:40:51 -04:00
Brandy Carney
f807841431 chore: update changelog 2016-08-17 13:38:19 -04:00
Ramon Henrique Ornelas
1d33da9a56 style(): fix angular style import (#7722) 2016-08-17 13:19:08 -04:00
Thiery Laverdure
c11ae69b12 docs(popover): update instructions for presenting a popover 2016-08-17 09:22:09 -05:00
Justin Willis
82852fb353 fix(changelog): specify version of forms 2016-08-17 08:52:47 -05:00
Brandy Carney
a8dc613627 test(button): fix karma tests for the new button syntax 2016-08-16 18:29:33 -04:00
Brandy Carney
d30643c4a0 chore: fix linter errors 2016-08-16 18:22:27 -04:00
Brandy Carney
938864e8d0 refactor(button): add ion-button attribute and icon attributes to style buttons
BREAKING CHANGES:

- `<button>` becomes `<button ion-button>`
- `<a button>` becomes `<a ion-button>`
- `<button ion-item>` does not get the `ion-button` attribute
- Buttons inside of `<ion-item-options>` do get the `ion-button`
attribute
- Removed the `category` attribute, this should be passed in
`ion-button` instead.
- Button attributes added for icons in buttons: `icon-only`,
`icon-left`, and `icon-right`

closes #7466
2016-08-16 17:11:02 -04:00
Ramon Ornelas
90929d0ef9 docs(gestures): fix dgeni tag
Closes #7721
2016-08-14 18:45:35 -05:00
Stone C. Lasley
c750847df1 feat(loading): add setContent function 2016-08-12 18:24:07 -06:00
Da-FyK
8d0cc39357 docs(): fix path (nav->navbar) typo 2016-08-12 15:26:16 -05:00
Jad Salhani
6e4ea07b9e Update Changelog to use exact Ionic versions
Upon testing the `npm install` command, npm install Ionic Beta 10 and `angular/forms 0.3.0`. `angular/forms 0.3.0` required angular RC-5, so a Missing Peer warning was issued.

I think it would be better to have them exact like the others
2016-08-12 13:38:00 +03:00
Justin Willis
4bcd8153dd perf(item): apply will-change only when list is active 2016-08-11 01:11:15 -05:00
Emanuel
3324e32617 fix(checkbox): disabled toggle should not fire events or animate 2016-08-10 15:14:01 -05:00
mhartington
1f78487d96 feat(itemReorder): animate reorder button 2016-08-10 15:58:27 -04:00
Dan Bucholtz
174efc196d fix(gestures): fixes scroll issue with hammer config
Fixes scroll issue with hammer config where pinch/rotate gestures are preventing the screen from scrolling.

Closes #6897
2016-08-10 14:16:08 -05:00
Brandy Carney
4e3bcb98a5 chore: update steps to upgrade to install exact versions and work on windows 2016-08-10 14:08:42 -04:00
Attila Oláh
4fdf08f393 docs(changelog): update beta 11 install instructions
Angular RC5 just has been released, this causes the original install command to fail. I have added the required (RC4) version to the command.
2016-08-10 13:01:58 -05:00
Brandy Carney
54a33e08e7 docs(overlays): update the overlay docs for multiple classes in cssClass
closes #7618
2016-08-10 11:12:02 -04:00
Dan Bucholtz
e244d09eaa docs(app): documented setEnabled, setScrollDisabled methods
documented setEnabled, setScrollDisabled methods
2016-08-10 09:38:08 -05:00
Brandy Carney
79e25a342d feat(toast): add ability to pass multiple classes to cssClass
references #7618
2016-08-09 16:23:12 -04:00
Brandy Carney
466dea310b feat(loading): add ability to pass multiple classes to cssClass
references #7618
2016-08-09 16:15:58 -04:00
Brandy Carney
68ab2618d3 feat(action-sheet): add ability to pass multiple classes to cssClass
references #7618
2016-08-09 16:13:27 -04:00
Brandy Carney
a685cdc4af feat(popover): add ability to pass multiple classes to cssClass
references #7618
2016-08-09 16:09:02 -04:00
Brian Dennis
93898bb3ed docs(sass): find all sass files in folder 2016-08-09 10:55:55 -05:00
Justin Willis
42fa36bb91 test(alert): add test for overlays in viewDidEnter (#7606)
* chore(test): add test for overlays in viewDidEnter

* fix(test): dont break snapshot

* fix(test): fix where we import from
2016-08-08 13:13:26 -04:00
Purusothaman Ramanujam
e7adbad962 docs(): Update CONTRIBUTING.md (#7603)
Incorrect link.
2016-08-08 12:04:55 -04:00
mhartington
4cfb5a48ee doc(): update private 2016-08-06 12:26:06 -04:00
Brandy Carney
7b88c03300 chore(ionic): release beta.11 2016-08-05 11:32:22 -04:00
Brian Troncone
8c067234d5 Update to use reorder icon
Reorder template is currently using the menu icon instead of reorder icon. I updated the template to use proper reorder icon.
2016-07-28 09:27:46 -04:00
1038 changed files with 33264 additions and 24080 deletions

View File

@@ -5,7 +5,7 @@ Thanks for your interest in contributing to the Ionic Framework! :tada:
## Contributing Etiquette
Please see our [Contributor Code of Conduct](./CODE_OF_CONDUCT.md) for information on our rules of conduct.
Please see our [Contributor Code of Conduct](https://github.com/driftyco/ionic/blob/master/CODE_OF_CONDUCT.md) for information on our rules of conduct.
## Creating an Issue
@@ -97,7 +97,7 @@ Looking for an issue to fix? Make sure to look through our issues with the [help
*
* ...
*
* @demo /docs/v2/demos/badge/
* @demo /docs/v2/demos/src/badge/
**/
```
3. Run `gulp watch.demos` to watch for changes to the demo

24
.gitignore vendored
View File

@@ -8,6 +8,7 @@ log.txt
*.sublime-workspace
.idea/
.vscode/
.sass-cache/
.versions/
coverage/
@@ -21,12 +22,19 @@ $RECYCLE.BIN/
Thumbs.db
UserInterfaceState.xcuserstate
scripts/resources/web-animations-js/test/
scripts/resources/web-animations-js/inter-*
scripts/resources/web-animations-js/**/*.map
scripts/resources/web-animations-js/**/*.md
scripts/resources/web-animations-js/**/*.sh
scripts/resources/web-animations-js/**/*.yml
scripts/resources/web-animations-js/**/*.gz
.package.tmp.json
src/themes/version.scss
scripts/e2e/webpackEntryPoints.json
scripts/build/e2e-generated-tsconfig.json
*.css.ts
# demo stuff
demos/node_modules
demos/polyfills
demos/css
demos/fonts
demos/src/**/*.js*
demos/src/**/*.ngfactory.ts
demos/src/**/*.d.ts
demos/src/**/*.metadata.json

View File

@@ -3,10 +3,15 @@
# See config at https://github.com/brigade/scss-lint/blob/master/config/default.yml
exclude:
- 'src/components/slides/**'
- 'src/components/item/item.ios.scss'
- 'src/components/item/item.md.scss'
- 'src/components/list/list.ios.scss'
- 'src/components/show-hide-when/**'
- 'src/components.*.scss'
- 'src/util/*.scss'
- 'src/components/slides/**'
- 'src/themes/ionic.mixins.scss'
- 'src/themes/license.scss'
- 'src/themes/util.scss'
- 'src/themes/version.scss'
- 'src/platform/cordova.*.scss'

View File

@@ -1,3 +1,765 @@
<a name="2.0.0-rc.0"></a>
# [2.0.0-rc.0](https://github.com/driftyco/ionic/compare/v2.0.0-beta.11...v2.0.0-rc.0) (2016-09-28)
RC0 requires changes to the structure of your app. To get started updating your app see the [upgrade steps](#steps-to-upgrade-to-rc0) section below.
### New Features
* Ionic 2 API finalized for `2.0.0` release
* Angular 2.0.0 (final!)
* ionViewCanEnter / CanLeave lifecycle events
* FAB Button lists
* Ahead of Time (AoT) compiler ready
* Components can now individually set a mode, which means an app can mix and match iOS / Material Design / Windows Platform modes if thats desired.
* Typescript 2.0
* @types support for third-party libraries
* Move away from `gulp` to `@ionic/app-scripts`
* Use Rollup for bundling instead of `browserify` or `webpack`
### BREAKING CHANGES
* Angular upgrade to [2.0.0](https://angular.io/docs/ts/latest/cookbook/rc4-to-rc5.html)
* [Renamed Lifecycle events](#lifecycle-events-renamed).
* Storage has been removed from ionic-angular and into a separate module, @ionic/storage.
Starters have been updated to add this, make sure to add it to your package.json if youre using the storage system. See more [details here](#storage).
* Nav transitions are queued. For more info on what this means for you see [this section](#nav-transitions).
* Removed Tabs `preloadTabs` ability. This is no longer needed with the Ahead of Time (AoT) compiler.
* Icons in buttons require an attribute on the parent button in order to style them.
* Platform and mode CSS classes have been moved from the <body> element to the <ion-app> element.
* select: Selects `alertOptions` input has been renamed to `selectOptions`. See more [details here](#select-changes).
* colors: Colors should be passed in the `color` input on components, not added
individually as an attribute on the component. See more [details here](#component-colors).
* buttons: `<button>` becomes `<button ion-button>`. See more [details here](#new-behavior-of-button) and [here](#new-behavior-of-icons-in-buttons).
* Head link tags for CSS files are no longer dynamically updated, but one CSS file is imported.
(Future build processes will narrow down the CSS file further to only include whats used). See more [details here](#update-css-link-tags).
* The `<scroll-content>` element, which is internal to `<ion-content>`, has been renamed to
`<div class=”scroll-content”>` since it was neither a directive nor a web component.
* `<ion-fixed>` has been removed, use `<div ion-fixed>` instead.
* scss: Changes to how sass/scss is imported. See more [details here](#sass-import).
* typings: We have stopped using the `typings` tool and have migrated to `npm @types`. See more [details here](#typings).
#### Lifecycle Events Renamed
Renamed `ionViewLoaded` to `ionViewDidLoad`
Removed `ionViewDidUnload`
Removed `fireOtherLifecycles` from ViewController
#### Nav Transitions
Nav transitions are now queued. Meaning if you run:
```
navCtrl.push(Page1);
navCtrl.push(Page2);
```
Page1 will transition in, then immediately Page2 will transition in. There can never be two transitions happening at the same time.
Page transition promises can now possibly reject the returned promises. Used mainly for `ionViewCanEnter` and `ionViewCanLeave`.
#### Component Colors
Colors are no longer added directly to a component, they should instead be passed in the `color` attribute.
For example:
```
<ion-tabs primary>
```
Becomes
```
<ion-tabs color=”primary”>
```
Or to bind an expression to color:
```
<ion-navbar [color]="barColor">
...
</ion-navbar>
```
```ts
@Component({
templateUrl: 'build/pages/about/about.html'
})
export class AboutPage {
barColor: string;
constructor(private nav: NavController, platform: Platform) {
this.barColor = platform.is('android') ? 'primary' : 'light';
}
}
```
Components with this property:
Badge
Button
Checkbox
Chip
FAB
Icon
Item (Item, Item Divider, List Header)
Label
Navbar
Radio
Searchbar
Segment
Spinner
Tabs
Toggle
Toolbar
Typography (headers, paragraphs, spans, etc.)
**Reason for this change:**
It was difficult to dynamically add colors to components, especially if the name of the color attribute was unknown in the template.
This change keeps the css flat since we arent chaining color attributes on components and instead we assign a class to the component which includes the colors name.
This allows you to easily toggle a component between multiple colors.
Speeds up performance because we are no longer reading through all of the attributes to grab the color ones.
#### Select Changes
Selects `alertOptions` input has been renamed to `selectOptions`. It now allows you to pass options for either the alert or action-sheet
interface. Refer to their documentation for the options each of them
accept.
[ActionSheet](http://ionicframework.com/docs/v2/api/components/action-sheet/ActionSheetController/#create)
[Alert](http://ionicframework.com/docs/v2/api/components/alert/AlertController/#create)
#### New Behavior of Button
`<button>` becomes `<button ion-button>`
`<a button>` becomes `<a ion-button>`
`<button ion-item>` does not get the `ion-button` attribute
Buttons inside of `<ion-item-options>` do get the `ion-button` attribute
**Reason for this change:**
It was difficult to have custom buttons since buttons automatically received the Ionic styles - the user can now take advantage of adding their own styling to a button if they want it to behave differently than the Ionic button.
Keeping the `<a>` and `<button>` element and adding `ion-button` as an attribute gives us the ability to take advantage of the native functionality and built-in accessibility of native elements. If Ionic provided an <ion-button> wed have to copy over all the possible attributes and events to the real nested button/link (type=submit, formnovalidate, value, autofocus, href, target, focus/blur, download, nofollow, ping, tel:86705309, etc). Additionally, ng2 does not have the “replace” directive where <ion-button> could be turned into <a ion-button>.
Since `button` was already being used as an attribute to the `<a>` element, this is more consistent between the two.
If a navPush or navPop directive is on an `<a ion-button>`, Ionic can automatically add the `href` attribute.
[A few reasons why we didnt create `<ion-button>`](https://www.youtube.com/watch?list=PLNYkxOF6rcICWx0C9LVWWVqvHlYJyqw7g&v=CZGqnp06DnI)
references #7467
* button: - `<button>` becomes `<button ion-button>`
- `<a button>` becomes `<a ion-button>`
- `<button ion-item>` does not get the `ion-button` attribute
- Buttons inside of `<ion-item-options>` do get the `ion-button`
attribute
- Removed the `category` attribute, this should be passed in
`ion-button` instead.
- Button attributes added for icons in buttons: `icon-only`,
`icon-left`, and `icon-right`
#### New Behavior of Icons in Buttons
Icon only buttons
```
<button>
<ion-icon name=”rainy”></ion-icon>
</button>
```
becomes
```
<button ion-button icon-only>
<ion-icon name=”rainy”></ion-icon>
</button>
```
Icon left of text in a button
```
<button>
<ion-icon name=”rainy”></ion-icon>
Rainy
</button>
```
becomes
```
<button ion-button icon-left>
<ion-icon name=”rainy”></ion-icon>
Rainy
</button>
```
Icon right of text in a button
```
<button>
Rainy
<ion-icon name=”rainy”></ion-icon>
</button>
```
becomes
```
<button ion-button icon-right>
Rainy
<ion-icon name=”rainy”></ion-icon>
</button>
```
Item option buttons - the `icon-left` attribute should still be added to the `<ion-item-options>` container and not the button itself.
`menuToggle` buttons should not get the `icon-only` attribute
**Reason for this change:**
There was a noticeable performance decrease from us reading in each button to determine where icons were placed and how to style them. This change improves performance.
This adds styling so that the buttons and icons will be padded a certain amount, but the user is free to leave these attributes off and style the components themselves.
#### Update CSS Link Tags
Ionic stylesheets are no longer dynamically loaded per platform. Instead there will be one CSS file to import. Note that future build processes will slim down the CSS file even further to only include component CSS actually used.
In the head of your `index.html` file, replace:
```
<!-- ionic dynamically decides which stylesheet to load -->
<link ios-href="build/css/app.ios.css" rel="stylesheet">
<link md-href="build/css/app.md.css" rel="stylesheet">
<link wp-href="build/css/app.wp.css" rel="stylesheet">
```
With:
```
<link href="build/main.css" rel="stylesheet">
```
#### Sass Import
The default configuration will be updated, but if your existing app is using Sass and importing Ionic Sass files directly youll need to update the `includePaths` of Node Sass.
```
node_modules/ionic-angular/themes
```
Next, to include Ionic into your custom Sass file youll need to update the Ionic import to this:
```
@import "ionic.theme.default";
```
#### Typings
Any type definitions for third party libraries that are included via the `typings` tool and are included in the the typings.json file should
be updated to use `npm @types`. An example of how this looks is:
```
npm install @types/lodash --save-dev --save-exact
```
Delete the `typings.json` file, and the `typings` directory.
#### Storage
The storage utilities have been moved outside of the framework to a separate library called `@ionic/storage`.
This library can be installed by executing the following command:
```
npm install @ionic/storage --save --save-exact
```
It must be included in the app's `NgModule` list of `providers`:
```
import { Storage } from '@ionic/storage';
...
@NgModule({
...
providers: [Storage]
})
```
It can then be injected into any class that needs access to it:
```
import { Storage } from '@ionic/storage';
...
export class MyAwesomePage {
constructor(public storage: Storage) {
}
ionViewDidEnter() {
this.storage.get('myKey').then( (value:any) => {
console.log('My value is:', value);
});
}
}
```
#### Deployment Changes
`ionic-angular` package includes es5 code with es2015 module import/exports, `umd` modules, and pure `es2015` code. The `package.json` is set up using the `main` and `module` options to make this work seamlessly.
### Steps to Upgrade to RC0
We are providing 2 ways to update your app with this release. The first way will guide you through creating a new Ionic 2 project and copying your project files to it. This is the easiest way to update your app in our opinion. The second way will step through how to update your existing project. There are a lot of steps involved with this way, and we recommend viewing our conference app for any clarification if you choose this way. This is it! We dont plan on making any more major API changes after this version.
Note: For details on NgModules you can read the Angular docs on them [here](https://angular.io/docs/ts/latest/guide/ngmodule.html)
#### Copying Your Project to a New Project
1. Install the latest Ionic CLI:
```
npm install -g ionic
```
Note: if you have installed the beta cli you should run `npm uninstall -g ionic` first.
2. Create a new Ionic 2 RC0 app:
```
ionic start --v2 myApp
```
3. Copy/paste all of your pages from `app/pages/` of your beta.11 app to `src/pages/`, providers from `app/providers` to `src/providers` pipes from `app/pipes` to `src/pipes` and any custom components to `src/components` in the new RC0 app.
4. Modify all `templateUrl`'s to be relative to the `.ts` file. For example in `app.component.ts` the url should change from `build/app.html` to `app.html` and in a page referencing `about.html` from `build/pages/about/about.html` to `about.html`.
5. Import and add each of your pages to the `declarations` array and the `entryComponents` array in `src/app/app.module.ts.
6. Import and add each of your custom components to the `declarations` array in `src/app/app.module.ts`.
7. Import and add each of your providers to the `providers` array in `src/app/app.module.ts`.
8. Remove any use of the `providers` entry in `@Component` from your pages.
9. Change any uses of the `private` TypeScript keyword to `public`.
10. Change `<button />` to `<button ion-button />` according to [these instructions](#new-behavior-of-button).
11. Pass colors to the `color` attribute : `<button primary />` changes to `<button color=”primary” />`.
12. Move any Ionic config to the `IonicModule.forRoot(MyApp, {configObject})` in `app.module.ts` where its says `configObject`.
13. Move any variables from the mode specific sass files in you're beta.11 app into the `app.variables` file under the mode heading in the new RC0 app.
#### Modifying your Existing Project
1. Install the latest Ionic CLI:
```
npm install -g ionic
```
Note: if you have installed the beta cli you should run `npm uninstall -g ionic` first.
2. Update package.json dependencies and devDependencies to match the [ionic2-app-base package.json](https://github.com/driftyco/ionic2-app-base/blob/master/package.json), then run `npm install` in your project folder.
3. Copy the npm scripts from the [ionic2-app-base package.json](https://github.com/driftyco/ionic2-app-base/blob/master/package.json) to your package.json.
4. Delete the `gulpfile.js`.
5. Rename folder `app` to `src`.
6. Create directory `app` inside of `src`.
7. Move `app.html` and `app.ts` inside of `src/app`.
8. Rename `app.ts` to `app.component.ts`.
9. Add `app.module.ts` file and copy content from [ionic2-starter-blank](https://github.com/driftyco/ionic2-starter-blank/blob/master/src/app/app.module.ts).
10. Move any providers from `ionicBootstrap` in `app.component.ts` to the providers in `app.module.ts`. Make sure to copy imports too.
11. Import and add any of your custom components to the `declarations` array in `src/app/app.module.ts`.
12. Move any Ionic config to the `IonicModule.forRoot(MyApp, {configObject})` in `app.module.ts` where it says `configObject`.
13. Remove `ionicBootstrap` code from `app.component.ts`.
14. Export the main app class in `app.component.ts` and then rename all uses of `MyApp` in `app.module.ts` to your main app class (or rename the export to `MyApp` in `app.component.ts`).
15. Fix any imports in `app.component.ts` to use the correct path. For example, `./pages` becomes `../pages`.
16. Modify `app.module.ts` to import your page specific classes. See `HomePage` for example. All pages should be included here.
17. Fix any import paths in `app.module.ts`. For example, `./providers` becomes `../providers`.
18. Add `main.dev.ts` and `main.prod.ts` files from [ionic2-app-base](https://github.com/driftyco/ionic2-app-base/tree/master/src/app) to `app/`.
19. Move `www/index.html` to `src/index.html` and modify it to look like [ionic2-app-base](https://github.com/driftyco/ionic2-app-base/blob/master/src/index.html), make sure to keep any external scripts you have added.
20. Move `www/assets` to `src/assets`.
21. Move `www/img` to `src/assets/img`.
22. Move any other resources you have in `www/` to `src/assets/`.
23. Modify all `templateUrl`'s to be relative to the `.ts` file. For example in `app.component.ts` the url should change from `build/app.html` to `app.html` and in a page referencing `about.html` from `build/pages/about/about.html` to `about.html`.
24. Update .gitignore to match [ionic2-app-base](https://github.com/driftyco/ionic2-app-base/blob/master/.gitignore).
25. Delete the `typings/` folder and `typings.json` file.
26. Update `tsconfig.json` to match [ionic2-app-base](https://github.com/driftyco/ionic2-app-base/blob/master/tsconfig.json).
27. Modify `theme/` folder to delete the `app.core.scss` file and copy `app.variables.scss` from the [ionic2-app-base](https://github.com/driftyco/ionic2-app-base/blob/master/src/theme/variables.scss), then rename it to `variables.scss`.
28. Move any variables from the mode specific files into the `app.variables` file under the mode heading.
29. Fix any paths to images in your app. For example, before the path may look like `<img src="img/myImg.png">` and now it should be `<img src="assets/img/myImg.png">`.
30. Change any uses of the `private` TypeScript keyword to `public`.
31. Change any Ionic buttons from `<button />` to `<button ion-button />`, see [docs]() above.
32. Pass colors to the `color` attribute : `<button primary />` changes to `<button color=”primary” />`.
33. Add appropriate icon attributes, if the icon is on the left of the text in a button it should get `icon-left`, if the icon is on the right add `icon-right`, and if the button only has an icon in it, add the `icon-only` attribute to the button. [See New Behavior of Icons in Buttons]()
### Bug Fixes
* **action-sheet:** add icon-left to the button if an icon exists ([a731528](https://github.com/driftyco/ionic/commit/a731528))
* **animation:** prevent possible raf null errors ([0e8ebe5](https://github.com/driftyco/ionic/commit/0e8ebe5))
* **app:** corrected paths to theme from app.scss ([001c1c9](https://github.com/driftyco/ionic/commit/001c1c9))
* **changelog:** specify version of forms ([82852fb](https://github.com/driftyco/ionic/commit/82852fb))
* **checkbox:** disabled toggle should not fire events or animate ([3324e32](https://github.com/driftyco/ionic/commit/3324e32))
* **di:** update dependency injection and default configs ([7c05d0c](https://github.com/driftyco/ionic/commit/7c05d0c))
* **docs:** get rid of reference to [@Page](https://github.com/Page) ([6fb848c](https://github.com/driftyco/ionic/commit/6fb848c))
* **exports:** update module exports ([6784f5e](https://github.com/driftyco/ionic/commit/6784f5e))
* **fab:** colors in speed dial buttons ([b70614b](https://github.com/driftyco/ionic/commit/b70614b))
* **gestures:** fixes scroll issue with hammer config ([174efc1](https://github.com/driftyco/ionic/commit/174efc1)), closes [#6897](https://github.com/driftyco/ionic/issues/6897)
* **ion-fixed:** ion-fixed directive is not longer needed ([75d5526](https://github.com/driftyco/ionic/commit/75d5526))
* **item:** regression in sliding item introduced by 52ada1c ([e0c2129](https://github.com/driftyco/ionic/commit/e0c2129))
* **item:** sliding item events are zone wrapped ([47491fb](https://github.com/driftyco/ionic/commit/47491fb)), closes [#7630](https://github.com/driftyco/ionic/issues/7630)
* **item:** sliding item with icon-only buttons ([1d3d5a1](https://github.com/driftyco/ionic/commit/1d3d5a1))
* **menu:** open/close race condition ([8585427](https://github.com/driftyco/ionic/commit/8585427)), closes [#7629](https://github.com/driftyco/ionic/issues/7629) [#8001](https://github.com/driftyco/ionic/issues/8001)
* gulp validate passes successfully ([b750e46](https://github.com/driftyco/ionic/commit/b750e46))
* **nav:** move null assignment of _onWillDismiss ([35193c4](https://github.com/driftyco/ionic/commit/35193c4))
* **nav:** setRoot() and setPages() should not animate ([7012734](https://github.com/driftyco/ionic/commit/7012734))
* **navigation:** move onWillDismiss and onDidDismiss, add unit tests ([e26c425](https://github.com/driftyco/ionic/commit/e26c425))
* **platform:** fire platform ready on app init ([963e835](https://github.com/driftyco/ionic/commit/963e835))
* **reorder:** adjust reorder icon style for iOS and MD ([f3bb2dc](https://github.com/driftyco/ionic/commit/f3bb2dc))
* **templates:** add template tabs [#8207](https://github.com/driftyco/ionic/issues/8207) ([#8208](https://github.com/driftyco/ionic/issues/8208)) ([0f6ce28](https://github.com/driftyco/ionic/commit/0f6ce28))
* **urlSerializer:** improve findLinkByComponentData ([9d563f5](https://github.com/driftyco/ionic/commit/9d563f5))
### Code Refactoring
* **button:** add ion-button attribute and icon attributes to style buttons ([938864e](https://github.com/driftyco/ionic/commit/938864e)), closes [#7466](https://github.com/driftyco/ionic/issues/7466)
* **colors:** color should be added as an input instead of directly adding the color to the component ([55a0257](https://github.com/driftyco/ionic/commit/55a0257)), closes [#7087](https://github.com/driftyco/ionic/issues/7087) [#7401](https://github.com/driftyco/ionic/issues/7401) [#7523](https://github.com/driftyco/ionic/issues/7523)
* **select:** rename alertOptions to selectOptions, add ability to pass them for action-sheet ([b8285b7](https://github.com/driftyco/ionic/commit/b8285b7)), closes [#7764](https://github.com/driftyco/ionic/issues/7764)
### Features
* **action-sheet:** add ability to pass multiple classes to cssClass ([68ab261](https://github.com/driftyco/ionic/commit/68ab261))
* **chips:** added Chip component ([421f637](https://github.com/driftyco/ionic/commit/421f637))
* **chips:** finished Component ([0dece72](https://github.com/driftyco/ionic/commit/0dece72))
* **fab:** update floating action buttons ([490a06d](https://github.com/driftyco/ionic/commit/490a06d))
* **itemReorder:** animate reorder button ([1f78487](https://github.com/driftyco/ionic/commit/1f78487))
* **loading:** add ability to pass multiple classes to cssClass ([466dea3](https://github.com/driftyco/ionic/commit/466dea3))
* **loading:** add setContent function ([c750847](https://github.com/driftyco/ionic/commit/c750847))
* add polyfill task ([ce78194](https://github.com/driftyco/ionic/commit/ce78194))
* **nav:** component url navigation ([f477aa2](https://github.com/driftyco/ionic/commit/f477aa2))
* **nav:** set default stack history on app init ([ca8cc0a](https://github.com/driftyco/ionic/commit/ca8cc0a))
* **polyfills:** split up code and source polyfill task ([#8130](https://github.com/driftyco/ionic/issues/8130)) ([bcec66c](https://github.com/driftyco/ionic/commit/bcec66c))
* **popover:** add ability to pass multiple classes to cssClass ([a685cdc](https://github.com/driftyco/ionic/commit/a685cdc))
* **toast:** add ability to pass multiple classes to cssClass ([79e25a3](https://github.com/driftyco/ionic/commit/79e25a3))
### Performance Improvements
* **item:** apply will-change only when list is active ([4bcd815](https://github.com/driftyco/ionic/commit/4bcd815))
* **reorder:** reorder icon is display: none by default ([26441ec](https://github.com/driftyco/ionic/commit/26441ec))
* **ripple:** md ripple effect update to not affect layout ([14a3ea2](https://github.com/driftyco/ionic/commit/14a3ea2))
<a name="2.0.0-beta.11"></a>
# [2.0.0-beta.11](https://github.com/driftyco/ionic/compare/v2.0.0-beta.10...v2.0.0-beta.11) (2016-08-05)
### BREAKING CHANGES
- Angular2 has been updated to [RC4](https://github.com/angular/angular/blob/master/CHANGELOG.md#200-rc4-2016-06-30).
- ViewControllers `onDismiss` has been renamed to `onDidDismiss`
- Forms have been upgraded to `@angular/forms` - [Angular2 Forms Changes](https://docs.google.com/document/u/1/d/1RIezQqE4aEhBRmArIAS1mRIZtWFf6JxN_7B4meyWK0Y/pub).
- [Overlay components](#overlays) should now be created with their injected provider.
- The [Select Options](#select--option-7334) `checked` attribute has been renamed to `selected`.
- [Tabs input and config variables](#tab-inputconfig-7143) have been renamed.
- [Material Design tabs](#material-design-tabs-7455) have been updated to resemble Material Designs bottom navigation spec: https://material.google.com/components/bottom-navigation.html
- [Input highlight](#input-highlight-6449) was added as an option for `ios` and `wp` mode, but defaults to false.
- Please review the [Steps to Upgrade](#steps-to-upgrade-to-beta-11) below.
#### Overlays
- Overlay components, such as Alert or Modals, should now be created using its injected provider.
- Overlays now have the `present()` method on the overlays instance, rather than using `nav.present(overlayInstance)`.
- All overlays now present on top of all app content, to include menus.
- Below is an example of the change to `Alert`, but the pattern is the same for all overlays: ActionSheet, Loading, Modal, Picker, Popover, Toast
WAS:
```
import { NavController, Alert } from ionic-angular;
constructor(public nav: NavController) {
}
doAlert() {
let alert = Alert.create({
title: 'Alert',
});
this.nav.present(alert);
}
```
NOW:
```
import { AlertController } from ionic-angular;
constructor(public alertCtrl: AlertController) {
}
doAlert() {
let alert = this.alertCtrl.create({
title: 'Alert'
});
alert.present();
}
```
#### Select / Option [#7334](https://github.com/driftyco/ionic/issues/7334)
The Option components `checked` attribute has been renamed to `selected` in order to make an option selected. This follows the MDN spec for a select option: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option
If a `ngModel` is added to the Select component the value of the `ngModel` will take precedence over the `selected` attribute.
See the [Select](http://ionicframework.com/docs/v2/api/components/select/Select/) and [Option](http://ionicframework.com/docs/v2/api/components/option/Option/) documentation for usage examples.
#### Tab Input/Config [#7143](https://github.com/driftyco/ionic/issues/7143)
Tab input/config options have been renamed. The following options were
renamed:
- `tabbarHighlight` -> `tabsHighlight`
- `tabbarLayout` -> `tabsLayout`
- `tabSubPages` -> `tabsHideOnSubPages`
- `tabbarPlacement` -> `tabsPlacement`
The previous names have been deprecated. They will still work in the
current release but will be removed in the future so please update to
the new names.
#### Material Design Tabs [#7455](https://github.com/driftyco/ionic/issues/7455)
Material Design mode defaults have changed to the following:
```
tabsHighlight: false,
tabsPlacement: 'bottom',
tabsHideOnSubPages: false
```
`tabsHighlight` can now be passed as an attribute on the `ion-tabs` element, this allows for tabs to be added in multiple places inside of an app and enable the highlight on some of them.
Styling of the Material Design tabs reflects the spec for bottom navigation: https://material.google.com/components/bottom-navigation.html
To get the old style of tabs, override the config in your bootstrap, for example:
```
ionicBootstrap(ConferenceApp, [ConferenceData, UserData], {
platforms: {
android: {
tabsPlacement: 'top',
tabsHideOnSubPages: true,
tabsHighlight: true
}
}
});
```
And optionally override any of the Sass variables for `md` mode in `theme/app.md.scss`:
```
$tabs-md-tab-text-capitalization: uppercase;
$tabs-md-tab-font-weight: 500;
$tabs-md-tab-text-transform: scale(1);
```
For a searchable list of all of the Sass variables, see the theming documentation: http://ionicframework.com/docs/v2/theming/overriding-ionic-variables/
#### Input Highlight [#6449](https://github.com/driftyco/ionic/issues/6449)
Fixed typos in the input highlight variables:
- `$text-input-md-hightlight-color-valid` -> `$text-input-md-highlight-color-valid`
- `$text-input-wp-hightlight-color-valid` -> `$text-input-wp-highlight-color-valid`
Modified variables to turn on/off the highlight:
ios (defaults to false for all):
```
$text-input-ios-show-focus-highlight: false !default;
$text-input-ios-show-valid-highlight: $text-input-ios-show-focus-highlight !default;
$text-input-ios-show-invalid-highlight: $text-input-ios-show-focus-highlight !default;
```
md (defaults to true for all):
```
$text-input-md-show-focus-highlight: true !default;
$text-input-md-show-valid-highlight: $text-input-md-show-focus-highlight !default;
$text-input-md-show-invalid-highlight: $text-input-md-show-focus-highlight !default;
```
wp (defaults to true for all):
```
$text-input-wp-show-focus-highlight: true !default;
$text-input-wp-show-valid-highlight: $text-input-wp-show-focus-highlight !default;
$text-input-wp-show-invalid-highlight: $text-input-wp-show-focus-highlight !default;
```
#### Steps to Upgrade to Beta 11
1. Run the following command in a terminal to update the npm dependencies:
```
npm install --save --save-exact ionic-angular@2.0.0-beta.11 @angular/common@2.0.0-rc.4 @angular/compiler@2.0.0-rc.4 @angular/core@2.0.0-rc.4 @angular/http@2.0.0-rc.4 @angular/platform-browser@2.0.0-rc.4 @angular/platform-browser-dynamic@2.0.0-rc.4 @angular/forms@0.2.0 rxjs@5.0.0-beta.6 zone.js@0.6.12
```
2. Update all Overlay components to be presented by their controller instead of `NavController`. For example, to update the popover component, the following code:
```
constructor(private nav: NavController) {}
presentPopover(event) {
let popover = Popover.create(PopoverPage);
this.nav.present(popover, { ev: event });
}
```
becomes:
```
constructor(private popoverCtrl: PopoverController) {}
presentPopover(event) {
let popover = this.popoverCtrl.create(PopoverPage);
popover.present({ ev: event });
}
```
3. Update any uses of `ViewController.onDismiss` to `ViewController.onDidDismiss`. The following code on dismiss of a modal:
```
modal.onDismiss(() => {
});
```
becomes:
```
modal.onDidDismiss(() => {
});
```
4. Update any uses of `checked` on an `<ion-option>` to use `selected`.
5. If you are using any of the tab config variables, update them to reflect the new names [above](#tab-inputconfig-7143).
6. If you are using any of the Sass Variables to override [tabs](#material-design-tabs-7455) or [input highlights](#input-highlight-6449), update them to reflect the new names above.
7. Please see the [Ionic Conference App](https://github.com/driftyco/ionic-conference-app) for an example of upgrading to Beta 11.
### Bug Fixes
* **activator:** do not activate elements while scrolling ([845a516](https://github.com/driftyco/ionic/commit/845a516)), closes [#7141](https://github.com/driftyco/ionic/issues/7141)
* **animation:** ele as string selector ([9fa31a1](https://github.com/driftyco/ionic/commit/9fa31a1))
* **animation:** fix easing timing function ([0cb093e](https://github.com/driftyco/ionic/commit/0cb093e)), closes [#7130](https://github.com/driftyco/ionic/issues/7130)
* **app:** add status bar padding when tab subpages are hidden ([d01ee4b](https://github.com/driftyco/ionic/commit/d01ee4b)), closes [#7203](https://github.com/driftyco/ionic/issues/7203)
* **backdrop:** flicker in UIWebView ([44ab527](https://github.com/driftyco/ionic/commit/44ab527))
* **backdrop:** use raf when adding/removing disable-scroll css ([941cb1d](https://github.com/driftyco/ionic/commit/941cb1d))
* **bootstrap:** return promise and resolve ionicBootstrap ([aebdf2f](https://github.com/driftyco/ionic/commit/aebdf2f)), closes [#7145](https://github.com/driftyco/ionic/issues/7145)
* **bootstrap:** tapclick is injected, probably ([7358072](https://github.com/driftyco/ionic/commit/7358072))
* **button:** apply css for buttons w/ ngIf ([816a648](https://github.com/driftyco/ionic/commit/816a648)), closes [#5927](https://github.com/driftyco/ionic/issues/5927)
* **button:** outline buttons do not have hairline borders in iOS ([4e88f89](https://github.com/driftyco/ionic/commit/4e88f89))
* **datetime:** format seconds token ([4fff262](https://github.com/driftyco/ionic/commit/4fff262)), closes [#6951](https://github.com/driftyco/ionic/issues/6951)
* **datetime-util:** fix convertDataToISO to handle negative timezone offsets ([ba53a23](https://github.com/driftyco/ionic/commit/ba53a23))
* **generator:** change nav to navCtrl ([b19547c](https://github.com/driftyco/ionic/commit/b19547c))
* **gestures:** detecting swipe angle correctly + sliding item logic fix ([d230cb4](https://github.com/driftyco/ionic/commit/d230cb4))
* **input:** add input highlight for ios, fix the highlight size ([11a24b9](https://github.com/driftyco/ionic/commit/11a24b9)), closes [#6449](https://github.com/driftyco/ionic/issues/6449)
* **item:** sliding item is closed when tapped ([7aa559a](https://github.com/driftyco/ionic/commit/7aa559a)), closes [#7094](https://github.com/driftyco/ionic/issues/7094)
* **loading:** clear timeout if dismissed before timeout fires ([5bbe31a](https://github.com/driftyco/ionic/commit/5bbe31a))
* **loading:** fix loading overlay during app init ([b615c60](https://github.com/driftyco/ionic/commit/b615c60)), closes [#6209](https://github.com/driftyco/ionic/issues/6209)
* **menu:** add statusbarPadding to the header and content in a menu ([a468fde](https://github.com/driftyco/ionic/commit/a468fde)), closes [#7385](https://github.com/driftyco/ionic/issues/7385)
* **menu:** fix content going under header ([3cd31c3](https://github.com/driftyco/ionic/commit/3cd31c3)), closes [#7084](https://github.com/driftyco/ionic/issues/7084)
* **menu:** getBackdropElement ([cac1d4f](https://github.com/driftyco/ionic/commit/cac1d4f))
* **menu:** only one menu can be opened at a time ([cac378f](https://github.com/driftyco/ionic/commit/cac378f)), closes [#6826](https://github.com/driftyco/ionic/issues/6826)
* **menu:** swipe menu is triggered when the swipe |angle| < 40º ([32a70a6](https://github.com/driftyco/ionic/commit/32a70a6))
* **nav:** fire lifecycle events from app root portal ([a4e393b](https://github.com/driftyco/ionic/commit/a4e393b))
* **nav:** fix menuCtrl reference in swipe back ([55a5e83](https://github.com/driftyco/ionic/commit/55a5e83))
* **nav:** register child nav when created from modal ([61a8625](https://github.com/driftyco/ionic/commit/61a8625))
* **picker:** fix iOS 8 picker display ([86fd8a4](https://github.com/driftyco/ionic/commit/86fd8a4)), closes [#7319](https://github.com/driftyco/ionic/issues/7319)
* **popover:** remove min-height from ios, add sass variables ([55bc32d](https://github.com/driftyco/ionic/commit/55bc32d)), closes [#7215](https://github.com/driftyco/ionic/issues/7215)
* **range:** add mouse listeners to document ([267ced6](https://github.com/driftyco/ionic/commit/267ced6))
* **range:** align the label in an item range to the center ([d675d39](https://github.com/driftyco/ionic/commit/d675d39)), closes [#7046](https://github.com/driftyco/ionic/issues/7046)
* **range:** ion-label stacked with ion-range ([5a8fe82](https://github.com/driftyco/ionic/commit/5a8fe82)), closes [#7046](https://github.com/driftyco/ionic/issues/7046)
* **range:** set ticks to an empty array to prevent errors ([7a2ad99](https://github.com/driftyco/ionic/commit/7a2ad99))
* **reorder:** better style ([f289ac6](https://github.com/driftyco/ionic/commit/f289ac6))
* **reorder:** canceled reorder is animated smoothly back ([8483a43](https://github.com/driftyco/ionic/commit/8483a43))
* **reorder:** non ion-item elements can be reordered ([ea9dd02](https://github.com/driftyco/ionic/commit/ea9dd02)), closes [#7339](https://github.com/driftyco/ionic/issues/7339)
* **reorder:** reorder can be used with any element ([d993a1b](https://github.com/driftyco/ionic/commit/d993a1b))
* **scroll:** fix scrolling after switching tabs ([e4bbcc6](https://github.com/driftyco/ionic/commit/e4bbcc6)), closes [#7154](https://github.com/driftyco/ionic/issues/7154)
* **select:** add the cssClass passed by the user to the alert for a select ([81ddd7f](https://github.com/driftyco/ionic/commit/81ddd7f)), closes [#6835](https://github.com/driftyco/ionic/issues/6835)
* **slides:** delay loading slides until view ready ([580b8d5](https://github.com/driftyco/ionic/commit/580b8d5)), closes [#7089](https://github.com/driftyco/ionic/issues/7089)
* **sliding:** much better UX + performance ([d6f62bc](https://github.com/driftyco/ionic/commit/d6f62bc)), closes [#6913](https://github.com/driftyco/ionic/issues/6913) [#6958](https://github.com/driftyco/ionic/issues/6958)
* **tabs:** add sass variable for inactive opacity and pass it to the colors loop ([99efa36](https://github.com/driftyco/ionic/commit/99efa36))
* **tabs:** center tabbar content ([997d54e](https://github.com/driftyco/ionic/commit/997d54e))
* **tabs:** fix preloadTabs null element reference ([2d19308](https://github.com/driftyco/ionic/commit/2d19308)), closes [#7109](https://github.com/driftyco/ionic/issues/7109)
* **tabs:** make the text color opaque instead of the entire button ([dd969a2](https://github.com/driftyco/ionic/commit/dd969a2)), closes [#6638](https://github.com/driftyco/ionic/issues/6638)
* **util:** UIEventManager should handle touchcancel event ([b805602](https://github.com/driftyco/ionic/commit/b805602))
### Features
* **alert:** allow smooth overflow scrolling ([5542a93](https://github.com/driftyco/ionic/commit/5542a93))
* **content:** add a resize function to recalculate the content size ([1fe1c1e](https://github.com/driftyco/ionic/commit/1fe1c1e))
* **footer:** apply shadow on MD footer and tabbar bottom ([686c262](https://github.com/driftyco/ionic/commit/686c262))
* **gesture:** Introducing new gesture controller ([9f19023](https://github.com/driftyco/ionic/commit/9f19023))
* **gesture-controller:** disable/enable scrolling ([72c24bc](https://github.com/driftyco/ionic/commit/72c24bc))
* **header:** apply shadow on MD headers ([6fa2faf](https://github.com/driftyco/ionic/commit/6fa2faf))
* **ion-content:** iOS only scroll bounce ([5c80445](https://github.com/driftyco/ionic/commit/5c80445))
* **select:** add disabled status in select options ([76619cf](https://github.com/driftyco/ionic/commit/76619cf))
* **tabs:** apply shadow on MD tabbar top ([1f4b3e2](https://github.com/driftyco/ionic/commit/1f4b3e2))
* **tabs:** add the transition for material design tabs ([eea7e6b](https://github.com/driftyco/ionic/commit/eea7e6b))
* **toolbar:** add attributes to hide all borders and box shadows ([88b637b](https://github.com/driftyco/ionic/commit/88b637b)), closes [#7237](https://github.com/driftyco/ionic/issues/7237)
* **viewcontroller:** add onWillDismiss callback ([ec99bfd](https://github.com/driftyco/ionic/commit/ec99bfd)), closes [#6702](https://github.com/driftyco/ionic/issues/6702)
### Performance Improvements
* **animation:** using will-change when using progressStep() ([267aa32](https://github.com/driftyco/ionic/commit/267aa32))
* **menu:** several improvements ([86c5aaf](https://github.com/driftyco/ionic/commit/86c5aaf))
<a name="2.0.0-beta.10"></a>
# [2.0.0-beta.10](https://github.com/driftyco/ionic/compare/v2.0.0-beta.9...v2.0.0-beta.10) (2016-06-27)

104
GUIDE.md
View File

@@ -1,104 +0,0 @@
# Ionic
Ionic makes it easy for web developers to best-in-class build mobile apps across major platforms, like iOS
and Android.
Since the initial release of Ionic in November 2013, 700,000 apps have been created with the Ionic SDK,
and many have been featured as top apps in the Apple App Store, Google Play Store, and Amazon App Store.
Ionic is a collection of CSS and Javascript components based on Angular 2. The core philosophy behind
Ionic is that a web developer can use the standard HTML5/CSS/Javascript stack they already know and love,
but get real mobile components underneath that adapt automatically to the device and platform they
run on.
## New to Ionic?
If Ionic 2 is your first exposure to Ionic, jump right in with the [Getting Started]() guide. Otherwise,
read below for some design philosophy changes from v1.
## New Concepts in Ionic 2
Ionic 2 brings even more parity to native SDKs like iOS and Android for the web stack.
With that in mind, some core components (like routing) work differently in v2 than v1.
### Navigation
In Ionic 1, we used UI Router with URL routing heavily to define navigation in your app.
The overwhelming feedback from Ionic 1 developers is that the routing and navigation
system was too difficult to use in practice. It was challenging to correctly map
URLs to views, and the navigation system didn't give the developer enough fine-grained control.
With v2, we've taken a more native-friendly navigation approach with a simpler `push/pop` system.
For example, in v1 we'd create a `ContactDetail` page like this:
```javascript
$stateProvider
.state('contact', {
url: "/contact/:contactId",
templateUrl: "templates/contact.html",
controller: 'ContactCtrl'
});
```
Then, to navigate to this, you'd do `<a ui-sref="contact({contact: contact})">{{contact.name}}</a>`
We'd also need to make sure we wired up the current `<ion-nav-view name>` which was considerably more
challenging when using nested navigation.
In v2, this works a bit differently. Instead of navigating through URLs and routing (which is still
possible as we will see a bit later), we push and pop views onto the stack:
`<ion-item (^click)="showContact(contact)">{{contact.name}}</ion-item>``
```javascript
class ContactsPage {
showContact(contact) {
this.nav.push(ContactDetail, {
contact: contact
});
}
}
```
There are also shortcut directives we can use for links much like `ui-sref`, such as
`nav-push` and `nav-pop` which can be used like this:
```html
<button [nav-push]="myContactComponent" [push-data]="contact">See contact</button>
```
```html
<button nav-pop>Go back</button>
```
The really nice thing about this is you can infinitely navigate now (for example,
you can keep pushing new `ContactDetail` pages onto the stack), and
control things like animation and the history stack the user has to navigate through.
You can also navigate inside of practically any container. For example, a modal window that slides up
can have its own navigation, and two split views can navigate independently, something
that was not possible before.
It also makes it incredibly easy to navigate to the same page in completely different
contexts. For example, if you were building something similar to Apple's App Store
app where there are multiple tabs at the bottom and each tab navigates independently,
you could navigate to an `AppDetail` page from any tab, which is exactly how the App Store app works.
For example, here's how the Minecraft `AppDetail` page looks in different tabs:
<img src="http://ionic-io-assets.s3.amazonaws.com/images/mc1.PNG" width="300" style="width: 300px">
<img src="http://ionic-io-assets.s3.amazonaws.com/images/mc2.PNG" width="300" style="width: 300px">
Notice the page is exactly the same, but the way the user navigated to it is different.
This hits on a core change in Ionic 2: the history state of the app is now your
responsibility as a developer. It's up to you to make sure navigation provides
a good UX, but you have the freedom to navigate as you see fit.
### Routing
In Ionic, routing is used more for breadcrumbs and loading state than it is for active
navigation.

View File

@@ -2,9 +2,9 @@
# Ionic 2: Beta
Ionic 2 is the next generation of [Ionic](http://ionicframework.com/), the open-source mobile app development SDK that makes it easy to build top quality mobile apps with web technologies.
Ionic 2 is the next generation of [Ionic](http://ionicframework.com/), the open-source mobile app development SDK that makes it easy to build top quality native and progressive web apps with web technologies.
Ionic 2 is based on the new [2.x version of AngularJS](https://angular.io/), and comes with many significant performance, usability, and feature improvements.
Ionic 2 is based on the new [2.x version of Angular](https://angular.io/), and comes with many significant performance, usability, and feature improvements.
See the [Building apps with Ionic 2](http://adamdbradley.github.io/building-with-ionic2) slides for a quick overview of Ionic 2.

View File

@@ -2,17 +2,19 @@ general:
branches:
ignore:
- ins_n_outs
dependencies:
pre:
- ./scripts/docs/prepare.sh
cache_directories:
- "~/ionic-site" # cache ionic-site
machine:
node:
version: 4.1.0
post:
- npm install -g npm@3.x.x
dependencies:
pre:
- ./scripts/docs/prepare.sh
cache_directories:
- "~/ionic-site" # cache ionic-site
test:
override:
- echo "Automatically marking tests as passing for now"
- gulp lint.ts
deployment:
tasks:
branch: "master"

View File

@@ -1,18 +0,0 @@
<ion-header>
<ion-navbar>
<ion-title>Alert</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<button block (click)="doAlert()">Basic Alert</button>
<button light block (click)="doConfirm()">Confirm Alert</button>
<button secondary block (click)="doPrompt()">Prompt Alert</button>
<button danger block (click)="doRadio()">Radio Alert</button>
<button dark block (click)="doCheckbox()">Checkbox Alert</button>
</ion-content>

View File

@@ -1 +0,0 @@
@import "../src/ionic.ios";

View File

@@ -1 +0,0 @@
@import "../src/ionic.md";

View File

@@ -1,2 +0,0 @@
$font-path: "../fonts";
$roboto-font-path: "../fonts";

View File

@@ -1,2 +0,0 @@
$font-path: "/fonts";
$roboto-font-path: "/fonts";

View File

@@ -1,31 +0,0 @@
// http://ionicframework.com/docs/v2/theming/
// App Shared Variables
// --------------------------------------------------
// To customize the look and feel of this app, you can override
// the Sass variables found in Ionic's source scss files. Setting
// variables before Ionic's Sass will use these variables rather than
// Ionic's default Sass variable values. App Shared Sass imports belong
// in the app.core.scss file and not this file. Sass variables specific
// to the mode belong in either the app.ios.scss or app.md.scss files.
// App Shared Color Variables
// --------------------------------------------------
// It's highly recommended to change the default colors
// to match your app's branding. Ionic uses a Sass map of
// colors so you can add, rename and remove colors as needed.
// The "primary" color is the only required color in the map.
// Both iOS and MD colors can be further customized if colors
// are different per mode.
$colors: (
primary: #387ef5,
secondary: #32db64,
danger: #f53d3d,
light: #f4f4f4,
dark: #222,
vibrant: rebeccapurple,
bright: #FFC125
);

View File

@@ -1 +0,0 @@
@import "../src/ionic.wp";

View File

@@ -1,68 +0,0 @@
<ion-header>
<ion-navbar>
<ion-title>Button</ion-title>
</ion-navbar>
</ion-header>
<ion-content text-center>
<h4>Colors</h4>
<button>Default</button>
<button secondary>Secondary</button>
<button danger>Danger</button>
<button light>Light</button>
<button dark>Dark</button>
<h4>Shapes</h4>
<button full>Full Button</button>
<button block>Block Button</button>
<button round>Round Button</button>
<button fab style="position: relative;">FAB</button>
<h4>Outlines</h4>
<button secondary full outline>Outline + Full</button>
<button secondary block outline>Outline + Block</button>
<button secondary round outline>Outline + Round</button>
<button secondary fab outline style="position: relative;">FAB</button>
<h4>Icons</h4>
<button dark>
<ion-icon name="star"></ion-icon>
Left Icon
</button>
<button dark>
Right Icon
<ion-icon name="star"></ion-icon>
</button>
<button dark>
<ion-icon name="star"></ion-icon>
</button>
<h4>Sizes</h4>
<button light large>Large</button>
<button light>Default</button>
<button light small>Small</button>
</ion-content>

View File

@@ -1,19 +0,0 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
class ApiDemoPage {}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

View File

@@ -1,19 +0,0 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
class ApiDemoPage {}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

View File

@@ -1,91 +0,0 @@
import { Component, Injectable, Pipe, PipeTransform } from '@angular/core';
import { Config, IonicApp, ionicBootstrap, LocalStorage, Platform, Storage } from 'ionic-angular';
@Pipe({
name: 'cleanLocalData'
})
@Injectable()
class CleanLocalDataPipe implements PipeTransform {
validKeys: string[];
output: any;
data: any;
transform(obj:any) : any {
this.validKeys = ['username', 'name', 'email', 'address'];
this.output = {};
this.data = JSON.parse(obj);
for (var i = 0; i < Object.keys(this.data).length; i++) {
if (this.validKeys.indexOf( Object.keys(this.data)[i] ) > -1) {
this.output[Object.keys(this.data)[i]] = this.data[Object.keys(this.data)[i]];
}
}
return JSON.stringify(this.output, null, 2);
}
}
@Component({
templateUrl: 'main.html',
pipes: [CleanLocalDataPipe]
})
class ApiDemoPage {
local: Storage;
localStorageDemo: string;
myItem: any;
keys = ['username', 'name', 'email', 'address'];
values = ['admin', 'Administrator', 'admin@administrator.com', '123 Admin St'];
addedKeys = [];
delKey: any;
constructor() {
this.local = new Storage(LocalStorage);
this.localStorageDemo = '{}';
window.localStorage.clear();
this.myItem = {
key: 'username',
value: 'admin'
};
}
set() {
if (this.myItem.key) {
let added = false;
for (let i = 0; i < this.addedKeys.length; i++) {
if (this.addedKeys[i] == this.myItem.key) added = true;
}
if (added == false) {
console.log("Adding key", this.myItem.key);
this.addedKeys.push(this.myItem.key);
this.delKey = this.myItem.key;
this.local.set(this.myItem.key, this.myItem.value );
this.localStorageDemo = JSON.stringify(window.localStorage, null, 2);
}
}
}
remove() {
this.local.remove(this.delKey);
this.localStorageDemo = JSON.stringify(window.localStorage, null, 2);
let index = this.addedKeys.indexOf(this.delKey);
if (index > -1) {
this.addedKeys.splice(index, 1);
}
}
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>',
pipes: [CleanLocalDataPipe]
})
class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

View File

@@ -1,68 +0,0 @@
<ion-header>
<ion-navbar>
<ion-title>Local Storage</ion-title>
</ion-navbar>
</ion-header>
<ion-content class="local-storage-demo outer-content">
<ion-list no-margin>
<ion-list-header>Add to Local Storage</ion-list-header>
<ion-item>
<ion-label>Key</ion-label>
<ion-select [(ngModel)]="myItem.key">
<ion-option *ngFor="let key of keys" [value]="key">
{{ key }}
</ion-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label>Value</ion-label>
<ion-select [(ngModel)]="myItem.value">
<ion-option *ngFor="let value of values" [value]="value">
{{ value }}
</ion-option>
</ion-select>
</ion-item>
</ion-list>
<div padding>
<button block secondary (click)="set()">
<ion-icon name="add"></ion-icon>
Add
</button>
</div>
<ion-list no-margin>
<ion-list-header>Delete from Local Storage</ion-list-header>
<ion-item>
<ion-label>Key</ion-label>
<ion-select [(ngModel)]="delKey">
<ion-option selected>Select a Key</ion-option>
<ion-option *ngFor="let key of addedKeys" [value]="key">
{{ key }}
</ion-option>
</ion-select>
</ion-item>
</ion-list>
<div padding>
<button block danger (click)="remove()">
<ion-icon name="remove"></ion-icon>
Delete
</button>
</div>
<div padding>
<h5>Local Storage:</h5>
<pre>local: {{ localStorageDemo | cleanLocalData }}</pre>
</div>
</ion-content>

View File

@@ -1,27 +0,0 @@
<ion-header>
<ion-navbar>
<button [menuToggle]="activeMenu">
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>
Menu
</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<h4>Active Menu: <b primary>{{ (activeMenu == 'menu1') ? 'Menu 1' : 'Menu 2' }}</b></h4>
<p>This page has two menus with different id's, but only one is active at a time.</p>
<button block secondary (click)="menu1Active()">Make Menu 1 Active</button>
<button block danger (click)="menu2Active()">Make Menu 2 Active</button>
<button block [menuToggle]="activeMenu">Toggle Menu</button>
</ion-content>

View File

@@ -1,83 +0,0 @@
import { Component } from '@angular/core';
import { Animation, ionicBootstrap, ModalController, NavController, NavParams, ViewController } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
export class ModalFirstPage {
myParam = '';
constructor(public modalCtrl: ModalController) {}
openBasicModal() {
let myModal = this.modalCtrl.create(ModalContentPage);
myModal.present();
}
openModalWithParams() {
let myModal = this.modalCtrl.create(ModalContentPage, { 'myParam': this.myParam });
myModal.present();
}
openCustomAnimationModal() {
let myModal = this.modalCtrl.create(ModalContentPage, {
animation: 'my-fade-in',
});
myModal.present();
}
}
@Component({
templateUrl: "modal-content.html"
})
export class ModalContentPage {
myParam: string;
constructor(
public viewCtrl: ViewController,
params: NavParams
) {
this.myParam = params.get('myParam');
}
dismiss() {
this.viewCtrl.dismiss();
}
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
root = ModalFirstPage;
}
ionicBootstrap(ApiDemoApp);
class FadeIn extends Animation {
constructor(enteringView: ViewController, leavingView: ViewController) {
super(enteringView.pageRef());
this
.easing('ease')
.duration(1000)
.fromTo('translateY', '0%', '0%')
.fromTo('opacity', 0, 1)
.before.addClass('show-page');
}
}
Animation.register('my-fade-in', FadeIn);
class FadeOut extends Animation {
constructor(enteringView: ViewController, leavingView: ViewController) {
super(leavingView.pageRef());
this
.easing('ease')
.duration(500)
.fromTo('opacity', 1, 0)
.before.addClass('show-page');
}
}
Animation.register('my-fade-out', FadeOut);

View File

@@ -1,15 +0,0 @@
<ion-header>
<ion-navbar>
<ion-title>Page {{pageNum}}</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<button block (click)="push()">Push Another Page</button>
<button secondary block (click)="pop()">Pop This Page</button>
</ion-content>

View File

@@ -1,36 +0,0 @@
$font-path: "../fonts";
$roboto-font-path: "../fonts";
// http://ionicframework.com/docs/v2/theming/
// App Shared Variables
// --------------------------------------------------
// To customize the look and feel of this app, you can override
// the Sass variables found in Ionic's source scss files. Setting
// variables before Ionic's Sass will use these variables rather than
// Ionic's default Sass variable values. App Shared Sass imports belong
// in the app.core.scss file and not this file. Sass variables specific
// to the mode belong in either the app.ios.scss or app.md.scss files.
// App Shared Color Variables
// --------------------------------------------------
// It's highly recommended to change the default colors
// to match your app's branding. Ionic uses a Sass map of
// colors so you can add, rename and remove colors as needed.
// The "primary" color is the only required color in the map.
// Both iOS and MD colors can be further customized if colors
// are different per mode.
$colors: (
primary: #387ef5,
secondary: #32db64,
danger: #f53d3d,
light: #f4f4f4,
dark: #222,
vibrant: rebeccapurple,
bright: #FFC125
);
@import "../src/ionic.ios";

View File

@@ -1,36 +0,0 @@
$font-path: "../fonts";
$roboto-font-path: "../fonts";
// http://ionicframework.com/docs/v2/theming/
// App Shared Variables
// --------------------------------------------------
// To customize the look and feel of this app, you can override
// the Sass variables found in Ionic's source scss files. Setting
// variables before Ionic's Sass will use these variables rather than
// Ionic's default Sass variable values. App Shared Sass imports belong
// in the app.core.scss file and not this file. Sass variables specific
// to the mode belong in either the app.ios.scss or app.md.scss files.
// App Shared Color Variables
// --------------------------------------------------
// It's highly recommended to change the default colors
// to match your app's branding. Ionic uses a Sass map of
// colors so you can add, rename and remove colors as needed.
// The "primary" color is the only required color in the map.
// Both iOS and MD colors can be further customized if colors
// are different per mode.
$colors: (
primary: #387ef5,
secondary: #32db64,
danger: #f53d3d,
light: #f4f4f4,
dark: #222,
vibrant: rebeccapurple,
bright: #FFC125
);
@import "../src/ionic.md";

View File

@@ -1,36 +0,0 @@
$font-path: "../fonts";
$roboto-font-path: "../fonts";
// http://ionicframework.com/docs/v2/theming/
// App Shared Variables
// --------------------------------------------------
// To customize the look and feel of this app, you can override
// the Sass variables found in Ionic's source scss files. Setting
// variables before Ionic's Sass will use these variables rather than
// Ionic's default Sass variable values. App Shared Sass imports belong
// in the app.core.scss file and not this file. Sass variables specific
// to the mode belong in either the app.ios.scss or app.md.scss files.
// App Shared Color Variables
// --------------------------------------------------
// It's highly recommended to change the default colors
// to match your app's branding. Ionic uses a Sass map of
// colors so you can add, rename and remove colors as needed.
// The "primary" color is the only required color in the map.
// Both iOS and MD colors can be further customized if colors
// are different per mode.
$colors: (
primary: #387ef5,
secondary: #32db64,
danger: #f53d3d,
light: #f4f4f4,
dark: #222,
vibrant: rebeccapurple,
bright: #FFC125
);
@import "../src/ionic.wp";

16
demos/package.json Normal file
View File

@@ -0,0 +1,16 @@
{
"name": "ionic-demos",
"private": true,
"version": "1.0.0",
"description": "ionic demos",
"author": "Ionic Team <hi@ionic.io> (http://ionic.io)",
"license": "MIT",
"dependencies": {
"@ionic/storage": "^1.0.3",
"ionic-angular": "nightly",
"ionicons": "^3.0.0"
},
"devDependencies": {
"typescript": "^2.0.3"
}
}

View File

@@ -1,19 +0,0 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
class ApiDemoPage {}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

View File

@@ -1,6 +0,0 @@
body.has-scrollbar scroll-content {
margin-right: -15px;
}
body.has-scrollbar ion-menu scroll-content {
margin-right: 0;
}

View File

@@ -1,45 +0,0 @@
(function(){
function hasScrollbar() {
if (typeof window.top.innerWidth === 'number') {
return window.top.innerWidth > window.top.document.documentElement.clientWidth;
}
// rootElem for quirksmode
var rootElem = window.top.document.documentElement || window.top.document.body;
// Check overflow style property on body for fauxscrollbars
var overflowStyle;
if (typeof rootElem.currentStyle !== 'undefined') {
overflowStyle = rootElem.currentStyle.overflow;
}
overflowStyle = overflowStyle || window.top.getComputedStyle(rootElem, '').overflow;
// Also need to check the Y axis overflow
var overflowYStyle;
if (typeof rootElem.currentStyle !== 'undefined') {
overflowYStyle = rootElem.currentStyle.overflowY;
}
overflowYStyle = overflowYStyle || window.top.getComputedStyle(rootElem, '').overflowY;
var contentOverflows = rootElem.scrollHeight > rootElem.clientHeight;
var overflowShown = /^(visible|auto)$/.test(overflowStyle) || /^(visible|auto)$/.test(overflowYStyle);
var alwaysShowScroll = overflowStyle === 'scroll' || overflowYStyle === 'scroll';
return (contentOverflows && overflowShown) || (alwaysShowScroll)
}
if (hasScrollbar() === true) {
setTimeout(function() {
var body = document.getElementsByTagName('body')[0];
body.className = body.className + ' has-scrollbar';
}, 500);
}
})();

View File

@@ -1,19 +0,0 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
class ApiDemoPage {}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

View File

@@ -1,19 +0,0 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
class ApiDemoPage {}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

View File

@@ -1,10 +1,8 @@
import { Component } from '@angular/core';
import { ActionSheetController, ionicBootstrap, Platform } from 'ionic-angular';
import { ActionSheetController, Platform } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
templateUrl: 'page.html'
})
export class ApiDemoPage {
constructor(public alertCtrl: ActionSheetController, public platform: Platform) { }
@@ -61,8 +59,6 @@ export class ApiDemoPage {
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
export class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

View File

@@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { ApiDemoApp, ApiDemoPage } from './app.component';
@NgModule({
declarations: [
ApiDemoApp,
ApiDemoPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage
]
})
export class AppModule {}

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Demo</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="../../css/ionic.min.css" rel="stylesheet">
<link href="../scrollbar-fix.css" rel="stylesheet">
</head>
<body>
<ion-app></ion-app>
<script src="../../polyfills/polyfills.js"></script>
<script src="../scrollbar-fix.js""></script>
<script src="./main.bundle.js"></script>
</body>
</html>

View File

@@ -0,0 +1,6 @@
import { platformBrowser } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppModuleNgFactory } from './app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

View File

@@ -9,6 +9,6 @@
<ion-content padding>
<button block (click)="present()">Basic Action Sheet</button>
<button ion-button block (click)="present()">Basic Action Sheet</button>
</ion-content>

View File

@@ -1,10 +1,9 @@
import { Component } from '@angular/core';
import { AlertController, ionicBootstrap } from 'ionic-angular';
import { AlertController } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
templateUrl: 'page.html'
})
export class ApiDemoPage {
testRadioOpen = false;
@@ -27,7 +26,7 @@ export class ApiDemoPage {
doConfirm() {
let alert = this.alertCtrl.create({
title: 'Use this lightsaber?',
body: 'Do you agree to use this lightsaber to do good across the intergalactic galaxy?',
message: 'Do you agree to use this lightsaber to do good across the intergalactic galaxy?',
buttons: [
{
text: 'Disagree',
@@ -50,7 +49,7 @@ export class ApiDemoPage {
doPrompt() {
let alert = this.alertCtrl.create({
title: 'Login',
body: "Enter a name for this new album you're so keen on adding",
message: 'Enter a name for this new album you\'re so keen on adding',
inputs: [
{
name: 'title',
@@ -212,10 +211,8 @@ export class ApiDemoPage {
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
template: `<ion-nav [root]="root"></ion-nav>`
})
class ApiDemoApp {
export class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

View File

@@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { ApiDemoApp, ApiDemoPage } from './app.component';
@NgModule({
declarations: [
ApiDemoApp,
ApiDemoPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage
]
})
export class AppModule {}

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Demo</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="../../css/ionic.min.css" rel="stylesheet">
<link href="../scrollbar-fix.css" rel="stylesheet">
</head>
<body>
<ion-app></ion-app>
<script src="../../polyfills/polyfills.js"></script>
<script src="../scrollbar-fix.js""></script>
<script src="./main.bundle.js"></script>
</body>
</html>

6
demos/src/alert/main.ts Normal file
View File

@@ -0,0 +1,6 @@
import { platformBrowser } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppModuleNgFactory } from './app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

18
demos/src/alert/page.html Normal file
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,14 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'page.html'
})
export class ApiDemoPage {}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class ApiDemoApp {
root = ApiDemoPage;
}

View File

@@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { ApiDemoApp, ApiDemoPage } from './app.component';
@NgModule({
declarations: [
ApiDemoApp,
ApiDemoPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage
]
})
export class AppModule {}

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Demo</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="../../css/ionic.min.css" rel="stylesheet">
<link href="../scrollbar-fix.css" rel="stylesheet">
</head>
<body>
<ion-app></ion-app>
<script src="../../polyfills/polyfills.js"></script>
<script src="../scrollbar-fix.js""></script>
<script src="./main.bundle.js"></script>
</body>
</html>

6
demos/src/button/main.ts Normal file
View File

@@ -0,0 +1,6 @@
import { platformBrowser } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppModuleNgFactory } from './app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

View File

@@ -0,0 +1,68 @@
<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>
<button ion-button fab style="position: relative;">FAB</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>
<button ion-button color="secondary" fab outline style="position: relative;">FAB</button>
<h4>Icons</h4>
<button ion-button icon-left color="dark">
<ion-icon name="star"></ion-icon>
Left Icon
</button>
<button ion-button icon-right 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

@@ -1,12 +1,10 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
templateUrl: 'page.html'
})
class ApiDemoPage {
export class ApiDemoPage {
data = {
jon: true,
@@ -19,7 +17,8 @@ class ApiDemoPage {
stannis: true,
petyr: false,
hodor: true,
catelyn: true
catelyn: true,
bronn: false
};
}
@@ -28,8 +27,6 @@ class ApiDemoPage {
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
export class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

View File

@@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { ApiDemoApp, ApiDemoPage } from './app.component';
@NgModule({
declarations: [
ApiDemoApp,
ApiDemoPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage
]
})
export class AppModule {}

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Demo</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="../../css/ionic.min.css" rel="stylesheet">
<link href="../scrollbar-fix.css" rel="stylesheet">
</head>
<body>
<ion-app></ion-app>
<script src="../../polyfills/polyfills.js"></script>
<script src="../scrollbar-fix.js""></script>
<script src="./main.bundle.js"></script>
</body>
</html>

View File

@@ -0,0 +1,6 @@
import { platformBrowser } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppModuleNgFactory } from './app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

View File

@@ -17,7 +17,7 @@
</ion-item>
<ion-item>
<ion-checkbox dark [(ngModel)]="data.daenerys"></ion-checkbox>
<ion-checkbox [(ngModel)]="data.daenerys" color="vibrant"></ion-checkbox>
<ion-label>Daenerys Targaryen</ion-label>
</ion-item>
@@ -27,12 +27,12 @@
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.tyroin" secondary></ion-checkbox>
<ion-checkbox [(ngModel)]="data.tyroin" color="secondary"></ion-checkbox>
<ion-label>Tyrion Lannister</ion-label>
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.sansa" danger></ion-checkbox>
<ion-checkbox [(ngModel)]="data.sansa" color="danger"></ion-checkbox>
<ion-label>Sansa Stark</ion-label>
</ion-item>
@@ -42,7 +42,7 @@
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.cersei" dark></ion-checkbox>
<ion-checkbox [(ngModel)]="data.cersei" color="dark"></ion-checkbox>
<ion-label>Cersei Lannister</ion-label>
</ion-item>
@@ -57,17 +57,17 @@
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.hodor" dark></ion-checkbox>
<ion-checkbox [(ngModel)]="data.hodor" color="dark"></ion-checkbox>
<ion-label>Hodor</ion-label>
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.catelyn" secondary></ion-checkbox>
<ion-checkbox [(ngModel)]="data.catelyn" color="secondary"></ion-checkbox>
<ion-label>Catelyn Stark</ion-label>
</ion-item>
<ion-item>
<ion-checkbox [(ngModel)]="data.bronn" royal></ion-checkbox>
<ion-checkbox [(ngModel)]="data.bronn" color="vibrant"></ion-checkbox>
<ion-label>Bronn</ion-label>
</ion-item>

View File

@@ -1,19 +1,18 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
templateUrl: 'page.html'
})
class ApiDemoPage {}
export class ApiDemoPage {
delete(chip: Element) {
chip.remove();
}
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
export class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

View File

@@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { ApiDemoApp, ApiDemoPage } from './app.component';
@NgModule({
declarations: [
ApiDemoApp,
ApiDemoPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage
]
})
export class AppModule {}

18
demos/src/chip/index.html Normal file
View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Demo</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="../../css/ionic.min.css" rel="stylesheet">
<link href="../scrollbar-fix.css" rel="stylesheet">
</head>
<body>
<ion-app></ion-app>
<script src="../../polyfills/polyfills.js"></script>
<script src="../scrollbar-fix.js""></script>
<script src="./main.bundle.js"></script>
</body>
</html>

6
demos/src/chip/main.ts Normal file
View File

@@ -0,0 +1,6 @@
import { platformBrowser } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppModuleNgFactory } from './app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

96
demos/src/chip/page.html Normal file
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

@@ -1,41 +1,39 @@
import { Component } from '@angular/core';
import { ionicBootstrap, IonicApp, Platform, NavController } from 'ionic-angular';
import { Platform, NavController } from 'ionic-angular';
if (!window.localStorage) {
Object.defineProperty(window, "localStorage", new (function () {
Object.defineProperty(window, 'localStorage', new (function () {
var aKeys = [], oStorage = {};
Object.defineProperty(oStorage, "getItem", {
Object.defineProperty(oStorage, 'getItem', {
value: function (sKey) { return sKey ? this[sKey] : null; },
writable: false,
configurable: false,
enumerable: false
});
Object.defineProperty(oStorage, "key", {
Object.defineProperty(oStorage, 'key', {
value: function (nKeyId) { return aKeys[nKeyId]; },
writable: false,
configurable: false,
enumerable: false
});
Object.defineProperty(oStorage, "setItem", {
Object.defineProperty(oStorage, 'setItem', {
value: function (sKey, sValue) {
if(!sKey) { return; }
document.cookie = escape(sKey) + "=" + escape(sValue) + "; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/";
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", {
Object.defineProperty(oStorage, 'length', {
get: function () { return aKeys.length; },
configurable: false,
enumerable: false
});
Object.defineProperty(oStorage, "removeItem", {
Object.defineProperty(oStorage, 'removeItem', {
value: function (sKey) {
if(!sKey) { return; }
document.cookie = escape(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
if (!sKey) { return; }
document.cookie = encodeURI(sKey) + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/';
},
writable: false,
configurable: false,
@@ -45,15 +43,18 @@ if (!window.localStorage) {
var iThisIndx;
for (var sKey in oStorage) {
iThisIndx = aKeys.indexOf(sKey);
if (iThisIndx === -1) { oStorage.setItem(sKey, oStorage[sKey]); }
else { aKeys.splice(iThisIndx, 1); }
if (iThisIndx === -1) {
(oStorage as any).setItem(sKey, oStorage[sKey]);
} else {
aKeys.splice(iThisIndx, 1);
}
delete oStorage[sKey];
}
for (aKeys; aKeys.length > 0; aKeys.splice(0, 1)) { oStorage.removeItem(aKeys[0]); }
for (aKeys; aKeys.length > 0; aKeys.splice(0, 1)) { (oStorage as any).removeItem(aKeys[0]); }
for (var aCouple, iKey, nIdx = 0, aCouples = document.cookie.split(/\s*;\s*/); nIdx < aCouples.length; nIdx++) {
aCouple = aCouples[nIdx].split(/\s*=\s*/);
if (aCouple.length > 1) {
oStorage[iKey = unescape(aCouple[0])] = unescape(aCouple[1]);
oStorage[iKey = decodeURI(aCouple[0])] = decodeURI(aCouple[1]);
aKeys.push(iKey);
}
}
@@ -79,7 +80,7 @@ export class TabPage {
@Component({
templateUrl: 'main.html'
templateUrl: 'page.html'
})
export class ApiDemoPage {
config: any;
@@ -89,18 +90,23 @@ export class ApiDemoPage {
if (window.localStorage.getItem('configDemo') !== null) {
this.config = JSON.parse(window.localStorage.getItem('configDemo'));
}
else if (platform.is('ios')) {
} 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': 'top'
'tabsPlacement': 'bottom'
};
}
@@ -118,7 +124,7 @@ export class ApiDemoPage {
}
@Component({
templateUrl: 'page.html'
templateUrl: 'push-page.html'
})
export class PushPage {
constructor(public navCtrl: NavController) {}
@@ -132,8 +138,6 @@ export class PushPage {
@Component({
template: '<ion-nav [root]="root" #content></ion-nav>'
})
class ApiDemoApp {
export class ApiDemoApp {
root = TabPage;
}
ionicBootstrap(ApiDemoApp, null, CONFIG_DEMO);

View File

@@ -0,0 +1,22 @@
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { ApiDemoApp, ApiDemoPage, PushPage, TabPage } from './app.component';
@NgModule({
declarations: [
ApiDemoApp,
ApiDemoPage,
PushPage,
TabPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage,
PushPage,
TabPage
]
})
export class AppModule {}

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Demo</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="../../css/ionic.min.css" rel="stylesheet">
<link href="../scrollbar-fix.css" rel="stylesheet">
</head>
<body>
<ion-app></ion-app>
<script src="../../polyfills/polyfills.js"></script>
<script src="../scrollbar-fix.js""></script>
<script src="./main.bundle.js"></script>
</body>
</html>

6
demos/src/config/main.ts Normal file
View File

@@ -0,0 +1,6 @@
import { platformBrowser } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppModuleNgFactory } from './app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

View File

@@ -41,7 +41,7 @@
<p class="note">Note: the config will not be updated until you click the button below.</p>
<div padding>
<button block (click)="load()">
<button ion-button block (click)="load()">
Update Config
</button>
</div>
@@ -50,14 +50,14 @@
<!-- this has to be formatted weird for pre -->
<pre margin>
ionicBootstrap(MyApp, [], {
<!--ionicBootstrap(MyApp, [], {
backButtonIcon: "{{initialConfig.backButtonIcon}}"
iconMode: "{{initialConfig.iconMode}}"
tabsPlacement: "{{initialConfig.tabsPlacement}}"
});</pre>
});--></pre>
<div padding>
<button block secondary (click)="push()">
<button ion-button block color="secondary" (click)="push()">
Go to Another Page
</button>
</div>

View File

@@ -6,6 +6,6 @@
<ion-content>
<div padding>
<button block (click)="pop()">Go Back to Config</button>
<button ion-button block (click)="pop()">Go Back to Config</button>
</div>
</ion-content>

View File

@@ -1,12 +1,9 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
templateUrl: 'page.html'
})
class ApiDemoPage {
export class ApiDemoPage {
wwwReleased = '1991';
netscapeReleased = '1994-12-15T13:47:20.789';
operaReleased = '1995-04-15';
@@ -68,8 +65,6 @@ class ApiDemoPage {
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
export class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

View File

@@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { ApiDemoApp, ApiDemoPage } from './app.component';
@NgModule({
declarations: [
ApiDemoApp,
ApiDemoPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage
]
})
export class AppModule {}

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Demo</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="../../css/ionic.min.css" rel="stylesheet">
<link href="../scrollbar-fix.css" rel="stylesheet">
</head>
<body>
<ion-app></ion-app>
<script src="../../polyfills/polyfills.js"></script>
<script src="../scrollbar-fix.js""></script>
<script src="./main.bundle.js"></script>
</body>
</html>

View File

@@ -0,0 +1,6 @@
import { platformBrowser } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppModuleNgFactory } from './app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

View File

@@ -1,15 +1,13 @@
import { Component, ViewChild } from '@angular/core';
import { Events, ionicBootstrap, Nav } from 'ionic-angular';
import { Events, Nav } from 'ionic-angular';
@Component({
templateUrl: 'login.html'
})
class Login {
export class Login {
user = {
name: "Administrator",
username: "admin"
name: 'Administrator',
username: 'admin'
};
constructor(private events: Events) {}
@@ -20,11 +18,10 @@ class Login {
}
@Component({
templateUrl: 'logout.html'
})
class Logout {
export class Logout {
constructor(private events: Events) {}
logout() {
@@ -36,7 +33,7 @@ class Logout {
@Component({
templateUrl: 'app.html'
})
class ApiDemoApp {
export class ApiDemoApp {
@ViewChild(Nav) nav: Nav;
root = Login;
@@ -71,5 +68,3 @@ class ApiDemoApp {
});
}
}
ionicBootstrap(ApiDemoApp);

View File

@@ -1,7 +1,7 @@
<ion-menu #menu [content]="content">
<ion-header>
<ion-toolbar secondary>
<ion-toolbar color="secondary">
<ion-title>Left Menu</ion-title>
</ion-toolbar>
</ion-header>
@@ -13,7 +13,7 @@
Logged in as <b>Administrator</b>
</ion-list-header>
<button ion-item menuClose *ngFor="let p of loggedInPages" (click)="openPage(menu, p)">
<ion-label primary>{{p.title}}</ion-label>
<ion-label color="primary">{{p.title}}</ion-label>
</button>
<button ion-item menuToggle>
@@ -27,7 +27,7 @@
Please Log In
</ion-list-header>
<button ion-item menuClose *ngFor="let p of loggedOutPages" (click)="openPage(menu, p)">
<ion-label primary>{{p.title}}</ion-label>
<ion-label color="primary">{{p.title}}</ion-label>
</button>
<button ion-item menuToggle>

View File

@@ -0,0 +1,20 @@
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { ApiDemoApp, Login, Logout } from './app.component';
@NgModule({
declarations: [
ApiDemoApp,
Login,
Logout
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
Login,
Logout
]
})
export class AppModule {}

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Demo</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="../../css/ionic.min.css" rel="stylesheet">
<link href="../scrollbar-fix.css" rel="stylesheet">
</head>
<body>
<ion-app></ion-app>
<script src="../../polyfills/polyfills.js"></script>
<script src="../scrollbar-fix.js""></script>
<script src="./main.bundle.js"></script>
</body>
</html>

View File

@@ -1,7 +1,7 @@
<ion-header>
<ion-navbar>
<button menuToggle>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
@@ -20,18 +20,18 @@
<ion-list no-margin>
<ion-item>
<ion-label stacked primary>Name</ion-label>
<ion-label stacked color="primary">Name</ion-label>
<ion-input [(ngModel)]="user.name" disabled></ion-input>
</ion-item>
<ion-item>
<ion-label stacked primary>Username</ion-label>
<ion-label stacked color="primary">Username</ion-label>
<ion-input [(ngModel)]="user.username" disabled></ion-input>
</ion-item>
</ion-list>
<div padding>
<button block (click)="login()">Login</button>
<button block secondary menuToggle>Toggle Menu</button>
<button ion-button block (click)="login()">Login</button>
<button ion-button block color="secondary" menuToggle>Toggle Menu</button>
</div>
</ion-content>

View File

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

6
demos/src/events/main.ts Normal file
View File

@@ -0,0 +1,6 @@
import { platformBrowser } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppModuleNgFactory } from './app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

View File

@@ -0,0 +1,30 @@
import { Component } from '@angular/core';
import { FabContainer } from 'ionic-angular';
@Component({
templateUrl: 'page.html'
})
export class ApiDemoPage {
array: number[] = [];
add() {
this.array.push(1);
}
clickMainFAB() {
console.log('Clicked open social menu');
}
openSocial(network: string, fab: FabContainer) {
console.log('Share in ' + network);
fab.close();
}
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class ApiDemoApp {
root = ApiDemoPage;
}

View File

@@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { ApiDemoApp, ApiDemoPage } from './app.component';
@NgModule({
declarations: [
ApiDemoApp,
ApiDemoPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage
]
})
export class AppModule {}

18
demos/src/fab/index.html Normal file
View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Demo</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="../../css/ionic.min.css" rel="stylesheet">
<link href="../scrollbar-fix.css" rel="stylesheet">
</head>
<body>
<ion-app></ion-app>
<script src="../../polyfills/polyfills.js"></script>
<script src="../scrollbar-fix.js""></script>
<script src="./main.bundle.js"></script>
</body>
</html>

6
demos/src/fab/main.ts Normal file
View File

@@ -0,0 +1,6 @@
import { platformBrowser } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppModuleNgFactory } from './app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

72
demos/src/fab/page.html Normal file
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,14 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'page.html'
})
export class ApiDemoPage {}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class ApiDemoApp {
root = ApiDemoPage;
}

View File

@@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { ApiDemoApp, ApiDemoPage } from './app.component';
@NgModule({
declarations: [
ApiDemoApp,
ApiDemoPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage
]
})
export class AppModule {}

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Demo</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="../../css/ionic.min.css" rel="stylesheet">
<link href="../scrollbar-fix.css" rel="stylesheet">
</head>
<body>
<ion-app></ion-app>
<script src="../../polyfills/polyfills.js"></script>
<script src="../scrollbar-fix.js""></script>
<script src="./main.bundle.js"></script>
</body>
</html>

View File

@@ -0,0 +1,6 @@
import { platformBrowser } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppModuleNgFactory } from './app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

View File

@@ -0,0 +1,14 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'page.html'
})
export class ApiDemoPage {}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class ApiDemoApp {
root = ApiDemoPage;
}

View File

@@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { ApiDemoApp, ApiDemoPage } from './app.component';
@NgModule({
declarations: [
ApiDemoApp,
ApiDemoPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage
]
})
export class AppModule {}

18
demos/src/icon/index.html Normal file
View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Demo</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="../../css/ionic.min.css" rel="stylesheet">
<link href="../scrollbar-fix.css" rel="stylesheet">
</head>
<body>
<ion-app></ion-app>
<script src="../../polyfills/polyfills.js"></script>
<script src="../scrollbar-fix.js""></script>
<script src="./main.bundle.js"></script>
</body>
</html>

6
demos/src/icon/main.ts Normal file
View File

@@ -0,0 +1,6 @@
import { platformBrowser } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppModuleNgFactory } from './app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

View File

@@ -10,50 +10,50 @@
<ion-content text-center class="icon-demo">
<ion-row>
<ion-col><ion-icon name="ionic" primary></ion-icon></ion-col>
<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" danger></ion-icon></ion-col>
<ion-col><ion-icon name="ionitron" primary></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" vibrant></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" bright></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" secondary></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" vibrant></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" bright></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" danger></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" secondary></ion-icon></ion-col>
<ion-col><ion-icon name="star" bright></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" vibrant></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" bright></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" primary></ion-icon></ion-col>
<ion-col><ion-icon name="rainy" color="primary"></ion-icon></ion-col>
</ion-row>
</ion-content>

View File

@@ -1,6 +1,5 @@
import { Component, Injectable } from '@angular/core';
import { ionicBootstrap, InfiniteScroll } from 'ionic-angular';
import { InfiniteScroll } from 'ionic-angular';
/**
* Mock Data Access Object
@@ -8,7 +7,7 @@ import { ionicBootstrap, InfiniteScroll } from 'ionic-angular';
@Injectable()
export class MockProvider {
getData() {
getData(): any[] {
// return mock data synchronously
let data = [];
for (var i = 0; i < 20; i++) {
@@ -17,7 +16,7 @@ export class MockProvider {
return data;
}
getAsyncData() {
getAsyncData(): Promise<any[]> {
// async receive mock data
return new Promise(resolve => {
@@ -64,10 +63,10 @@ export class MockProvider {
@Component({
templateUrl: 'main.html',
templateUrl: 'page.html',
providers: [MockProvider]
})
class ApiDemoApp {
export class ApiDemoApp {
items: string[];
constructor(private mockProvider: MockProvider) {
@@ -89,5 +88,3 @@ class ApiDemoApp {
}
}
ionicBootstrap(ApiDemoApp);

View File

@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { ApiDemoApp } from './app.component';
@NgModule({
declarations: [
ApiDemoApp
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoApp
]
})
export class AppModule {}

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Demo</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="../../css/ionic.min.css" rel="stylesheet">
<link href="../scrollbar-fix.css" rel="stylesheet">
</head>
<body>
<ion-app></ion-app>
<script src="../../polyfills/polyfills.js"></script>
<script src="../scrollbar-fix.js""></script>
<script src="./main.bundle.js"></script>
</body>
</html>

View File

@@ -0,0 +1,6 @@
import { platformBrowser } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppModuleNgFactory } from './app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

View File

@@ -1,18 +1,15 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
templateUrl: 'page.html'
})
class ApiDemoPage {}
export class ApiDemoPage {}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
export class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

View File

@@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { ApiDemoApp, ApiDemoPage } from './app.component';
@NgModule({
declarations: [
ApiDemoApp,
ApiDemoPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage
]
})
export class AppModule {}

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Demo</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="../../css/ionic.min.css" rel="stylesheet">
<link href="../scrollbar-fix.css" rel="stylesheet">
</head>
<body>
<ion-app></ion-app>
<script src="../../polyfills/polyfills.js"></script>
<script src="../scrollbar-fix.js""></script>
<script src="./main.bundle.js"></script>
</body>
</html>

6
demos/src/input/main.ts Normal file
View File

@@ -0,0 +1,6 @@
import { platformBrowser } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppModuleNgFactory } from './app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

View File

@@ -11,12 +11,12 @@
<ion-list>
<ion-item>
<ion-label primary>Inline Label</ion-label>
<ion-label color="primary">Inline Label</ion-label>
<ion-input placeholder="Text Input"></ion-input>
</ion-item>
<ion-item>
<ion-label primary fixed>Fixed Label</ion-label>
<ion-label color="primary" fixed>Fixed Label</ion-label>
<ion-input type="tel" placeholder="Tel Input"></ion-input>
</ion-item>
@@ -25,17 +25,17 @@
</ion-item>
<ion-item>
<ion-label primary stacked>Stacked Label</ion-label>
<ion-label color="primary" stacked>Stacked Label</ion-label>
<ion-input type="email" placeholder="Email Input"></ion-input>
</ion-item>
<ion-item>
<ion-label primary stacked>Stacked Label</ion-label>
<ion-label color="primary" stacked>Stacked Label</ion-label>
<ion-input type="password" placeholder="Password Input"></ion-input>
</ion-item>
<ion-item>
<ion-label primary floating>Floating Label</ion-label>
<ion-label color="primary" floating>Floating Label</ion-label>
<ion-input></ion-input>
</ion-item>

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