Compare commits

..

354 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
mhartington
0579bbafc9 docs(content): update docs 2016-08-05 10:00:22 -04:00
Adam Bradley
5cb9d65146 chore(): fix type check error 2016-08-04 22:54:50 -05:00
Adam Bradley
a4e393b619 fix(nav): fire lifecycle events from app root portal 2016-08-04 22:47:36 -05:00
Adam Bradley
8eb0667b79 test(tabs): fix navCtrl reference 2016-08-04 20:17:09 -05:00
Jon Evans
63bc41d607 docs(readme): fix link to CONTRIBUTING.md (#7550) 2016-08-04 17:18:25 -04:00
Brian Dennis
b581aad77f docs(sass): style property as code 2016-08-04 15:33:11 -05:00
Brian Dennis
5d7a5e09f4 docs(sass): prefix sass variables with $ 2016-08-04 15:06:25 -05:00
mhartington
5542a931f3 feat(alert): allow smooth overflow scrolling 2016-08-04 15:27:09 -04:00
Adam Bradley
3c493652b2 test(): update to public navCtrl convention 2016-08-04 13:50:15 -05:00
Adam Bradley
478ac45211 test(snapshot): hide all scrollbars during snapshot 2016-08-04 13:05:11 -05:00
Adam Bradley
ff3daeed6c chore(): remove css-scrollbar styles 2016-08-04 12:58:50 -05:00
Brandy Carney
dfb8ba4b98 docs(demo): update the item sliding demo so the archive does something
also hide pointer events on img

fixes #7547
2016-08-04 13:41:12 -04:00
Brandy Carney
108f821e99 docs(demos): clean up item sliding demo to simplify it
removed the toolbar styling and the reorder so it is just sliding.

references #7547
2016-08-04 13:16:21 -04:00
Adam Bradley
77e9b23bd2 test(nav): fix alert test 2016-08-04 12:07:24 -05:00
Adam Bradley
61a86253a8 fix(nav): register child nav when created from modal 2016-08-04 11:49:21 -05:00
Brandy Carney
3977928048 docs(demos): update the Option demo to use the Select demo 2016-08-04 12:46:23 -04:00
Brandy Carney
1bd5b59ee0 test(snapshot): update e2e tests that snapshot uses to be correct 2016-08-04 12:46:23 -04:00
Brian Dennis
d5da8ab0e2 docs(sass): add sass processor 2016-08-04 10:26:21 -05:00
mhartington
d7ce5709ce chore(docs): fix param type for dgeni 2016-08-04 11:01:26 -04:00
Adam Bradley
267ced618e fix(range): add mouse listeners to document 2016-08-04 08:52:21 -05:00
Max Lynch
2cb61d3d5a chore(sql): Update comment 2016-08-03 21:37:59 -05:00
Max Lynch
0888f07cb9 chore(docs): Update docs for nav controller 2016-08-03 21:36:50 -05:00
Justin Willis
8733dd89be docs(): note about ion-img outside virtualscroll (#7474) 2016-08-03 18:38:27 -04:00
Brandy Carney
15d69c2ab5 docs(sass): brian lied to me, update sass syntax
references driftyco/ionic-site#613
2016-08-03 17:50:42 -04:00
Brandy Carney
7a2ad99029 fix(range): set ticks to an empty array to prevent errors 2016-08-03 17:42:52 -04:00
mhartington
69169c5fc5 chore(docs): hide internal docs as well 2016-08-03 17:21:25 -04:00
Brandy Carney
b7c45482c6 docs(sass): add the correct documentation syntax for the sass vars
references driftyco/ionic-site#613
2016-08-03 17:07:44 -04:00
Brandy Carney
89f4f8408c Merge branch 'pr/7341'
# Conflicts:
#	src/components/select/test/single-value/index.ts
#	src/components/select/test/single-value/main.html
2016-08-03 12:37:24 -04:00
Brandy Carney
43d8bbdd12 test(select): add demo for the selected text
references #7341
2016-08-03 12:33:20 -04:00
Brandy Carney
248b8f4adf docs(demos): fix API demos missing the correct path to angular forms 2016-08-03 11:42:56 -04:00
Brandy Carney
b5b804725f refactor(select): rename the checked attribute to selected on option
BREAKING CHANGES:

The Option component’s `checked` attribute has been renamed to
`selected` in order to select an option. This is to the follow 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.

references #7334
2016-08-03 11:38:41 -04:00
Brandy Carney
ccf6ae5dd3 chore: fix linter error 2016-08-01 16:27:30 -04:00
Brandy Carney
eea7e6ba69 feat(tabs): add the transition for material design tabs
refactored the sass naming to use `text-capitalization` instead of
`text-transform` since it now has an actual `transform` property and I
think this will be less confusing than having a `text-text-transform`
and a `text-transform`.

references #7455
2016-08-01 16:22:20 -04:00
Dan Bucholtz
8bf1a353fd docs(nav, tabs): moved details from component docs to api docs where applicable (#7471)
moved details from component docs to api docs where applicable
2016-08-01 13:44:56 -05:00
mhartington
0a57213901 docs(navController): make popTo private
Closes https://github.com/driftyco/ionic-site/issues/615
2016-07-29 12:46:16 -05:00
mhartington
36e8604ed9 docs(navbar): add note about when to use navbar and when to use toolbar
Closes https://github.com/driftyco/ionic-site/issues/685
2016-07-29 12:37:16 -05:00
mhartington
4e26ea3294 docs(list): clean up docs and hide gestureCtrl 2016-07-29 11:27:09 -05:00
mhartington
1c596556c5 docs(footer, header): add docs 2016-07-29 10:37:12 -05:00
Brandy Carney
a468fde3f3 fix(menu): add statusbarPadding to the header and content in a menu
fixes #7385
2016-07-29 10:05:54 -05:00
Abdi Saeed
c9c46dfb0c docs(slides): typo fix (#7465) 2016-07-29 09:32:07 -05:00
Brandy Carney
bab90b5a3e test(tabs): update karma tests to latest default config 2016-07-29 09:28:52 -05:00
Brandy Carney
cab7b0d8b5 refactor(tabs): fix undefined sass variables 2016-07-28 23:35:06 -05:00
Brandy Carney
af01841c86 refactor(tabs): update Sass variable naming to be more consistent
Added comments on each Sass variable.

references #5651 references #7455
2016-07-28 23:11:26 -05:00
Brandy Carney
4dc53a2d9d refactor(tabs): change the material design tabs to act as bottom navigation
Update tabs to reflect the material design bottom navigation spec:
https://material.google.com/components/bottom-navigation.html#bottom-nav
igation-usage

BREAKING CHANGES:

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.

references #7455
2016-07-28 21:57:35 -05:00
Brandy Carney
087e2f2480 revert(tabs): undo commit that removes tab sub pages
Fix advanced tabs test

This reverts
https://github.com/driftyco/ionic/commit/743de19ae898e83375b51ef9c376225
c8e63f0ef
2016-07-28 15:28:55 -05: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
Brian Dennis
f3eb5fd3f2 docs(optional): add syntax to flag params as optional 2016-07-25 11:45:32 -05:00
Bryan Walker
d17441459e docs(input): update input
Added additional item highlighting ability to make text area taller and include placeholder text.
2016-07-24 21:16:36 -05:00
Mark McEahern
d62faf9d81 docs(label): update copy for clarity
Change `about` to `above`, which appears to be the intended meaning.
2016-07-24 21:13:37 -05:00
Szymon Stasik
9fa31a1ec8 fix(animation): ele as string selector 2016-07-24 21:12:20 -05:00
Justin Willis
b19547c9a8 fix(generator): change nav to navCtrl 2016-07-21 10:53:34 -05:00
Manu Mtz.-Almeida
86c5aaf7a1 perf(menu): several improvements
- `display: none;` when menu is closed
- `ion-backdrop` is display: none when it is not used
- `ion-backdrop` is much smaller
2016-07-20 07:16:31 -07:00
Andrew Mitchell
ba53a23c6e fix(datetime-util): fix convertDataToISO to handle negative timezone offsets 2016-07-19 13:35:36 -07:00
Manu Mtz.-Almeida
44ab527f74 fix(backdrop): flicker in UIWebView 2016-07-19 13:33:44 -07:00
Manu Mtz.-Almeida
ac8e4dce06 style(all): tslinter warnings 2016-07-19 13:31:46 -07:00
Brandy Carney
324f2cb189 test(input): fix input test to update the user form
closes #7335
2016-07-19 12:39:08 -04:00
Brian Dennis
0f418bcacf chore(CI): comment out bump version calls 2016-07-18 19:49:28 -05:00
perry
4f52135c13 Revert "Revert "Merge branch 'master' of https://github.com/driftyco/ionic""
This reverts commit 4a6086c1f8.
2016-07-18 19:40:03 -05:00
perry
4a6086c1f8 Revert "Merge branch 'master' of https://github.com/driftyco/ionic"
This reverts commit 8945bf906d, reversing
changes made to f4fac225fa.
2016-07-18 19:24:56 -05:00
Brian Dennis
8945bf906d Merge branch 'master' of https://github.com/driftyco/ionic 2016-07-18 19:16:34 -05:00
Brian Dennis
f4fac225fa chore(docs): change api root to latest stable 2016-07-18 18:10:14 -05:00
Manu Mtz.-Almeida
ea9dd02b5b fix(reorder): non ion-item elements can be reordered
the removed code was a premature optimization that does more harm than good

fixes #7339
2016-07-18 16:56:56 +02:00
Manu Mtz.-Almeida
cac378f35b fix(menu): only one menu can be opened at a time
fixes #6826
2016-07-17 20:42:29 -05:00
Manu Mtz.-Almeida
6e9eb93717 test(gestures): adds unit tests for pan recognizer 2016-07-16 19:06:56 +02:00
xr0master
cc343d8ed2 Update select.ts
Added ability set selected text like md-selected-text
2016-07-16 14:52:47 +03:00
Brandy Carney
99efa3687f fix(tabs): add sass variable for inactive opacity and pass it to the colors loop 2016-07-15 17:43:02 -04:00
Adam Bradley
0386476879 test(nav): clean up NavController tests 2016-07-15 15:55:49 -05:00
Adam Bradley
0a7d865975 refactor(nav): create NavControllerBase and public abstract class
Use NavController as the public API, and NavControllerBase as the
internal API. Refactored all app/nav/tabs unit tests and created
centralized mocking functions.
2016-07-15 15:54:56 -05:00
Manu Mtz.-Almeida
5909fa4ba5 refactor(gestures): no longer use hammer for drag gestures 2016-07-15 11:23:36 -05:00
Brandy Carney
11a24b98aa fix(input): add input highlight for ios, fix the highlight size
The input highlight can now be enabled for ios. Fixed wp’s
valid/invalid highlighting. The highlight bar now goes on top of the
item-inner border so it will resize if there is an icon to the left.

BREAKING CHANGES:

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;
```

fixes #6449
references #5052
2016-07-15 11:31:53 -04:00
Lenny Kean
86fd8a480f fix(picker): fix iOS 8 picker display
Fixes #7319
2016-07-14 21:28:01 -05:00
mhartington
cca200e7a0 chore(generators): update provider generator 2016-07-14 16:06:20 -04:00
Manu Mtz.-Almeida
fd54f44a66 style(item): fixes "degrees" typo 2016-07-14 15:04:15 +02:00
Manu Mtz.-Almeida
a2a71893e4 style(menu): typo (degress -> degrees) 2016-07-14 11:24:30 +02:00
Manu Mtz.-Almeida
32a70a62de fix(menu): swipe menu is triggered when the swipe |angle| < 40º 2016-07-14 11:17:23 +02:00
Manu Mtz.-Almeida
72c24bc927 feat(gesture-controller): disable/enable scrolling 2016-07-14 00:52:43 +02:00
Manu Mtz.-Almeida
d230cb40fe fix(gestures): detecting swipe angle correctly + sliding item logic fix 2016-07-14 00:03:53 +02:00
Adam Bradley
1ae6619367 Merge pull request #7212 from manucorporat/gesture-controller
New Gesture controller
2016-07-13 15:24:12 -05:00
Manu Mtz.-Almeida
9f19023cb9 feat(gesture): Introducing new gesture controller 2016-07-13 22:11:38 +02:00
Adam Bradley
b43689704b test(config): fix config tests 2016-07-12 20:33:39 -05:00
Adam Bradley
743de19ae8 refactor(tabs): remove tabSubPages UI
The Material Design spec has added “Bottom Navigation”, which is what
Ionic calls “Tabs”. Ionic’s MD mode now follows the updated Material
Design spec with the tabbar placed on the bottom. Additionally, any tab
sub pages do not automatically cover up the tabbar. Covering up the
tabbar is still possible by using a modal, however, it is no longer a
default feature for MD mode.
2016-07-12 20:28:40 -05:00
Manu Mtz.-Almeida
d6f62bcb60 fix(sliding): much better UX + performance
- sliding should behave exactly like a native one
- much better performance

references #7049
references #7116
closes #6913
closes #6958
2016-07-12 15:30:19 +02:00
Manu Mtz.-Almeida
b805602ffa fix(util): UIEventManager should handle touchcancel event 2016-07-12 15:30:19 +02:00
Adam Bradley
cca3309f4c chore(nav): create nav-interfaces file 2016-07-11 23:24:25 -05:00
Adam Bradley
8c2f0b448c test(nav): remove unused tests 2016-07-11 23:22:01 -05:00
Adam Bradley
2e570837df chore(util): add isPrimitive() util 2016-07-11 23:01:40 -05:00
Adam Bradley
91f66d8972 chore(): cleanup unused modules 2016-07-11 23:00:45 -05:00
Brandy Carney
10179c351d docs(item): add link to the utility attributes in item api docs
closes driftyco/ionic-site#661
2016-07-11 16:15:23 -04:00
Brandy Carney
dd969a2958 fix(tabs): make the text color opaque instead of the entire button
this affects `md` and `wp` mode.

fixes #6638
2016-07-08 17:20:18 -04:00
Brandy Carney
d3be0af46d test(tabs): clean up tabs badges e2e test so it works 2016-07-08 17:14:41 -04:00
Brandy Carney
d675d39a62 fix(range): align the label in an item range to the center
fixes #7046
2016-07-08 15:01:21 -04:00
Brandy Carney
65c84b307b revert(range): revert PR #7050, it breaks stacked labels and double labels
references #7046
2016-07-08 14:46:06 -04:00
Manu Mtz.-Almeida
5a8fe82c3a fix(range): ion-label stacked with ion-range (#7050)
fixes #7046
2016-07-08 14:34:46 -04:00
Brandy Carney
55bc32dafe fix(popover): remove min-height from ios, add sass variables
sass variables added for min-width and min-height.

closes #7215
2016-07-08 14:25:21 -04:00
Brandy Carney
d1234643ee docs(alert): update description of setCssClass
references #6835
2016-07-08 13:51:40 -04:00
Brandy Carney
81ddd7f0a9 fix(select): add the cssClass passed by the user to the alert for a select
fixes #6835
2016-07-08 13:44:05 -04:00
Brandy Carney
88b637b491 feat(toolbar): add attributes to hide all borders and box shadows
closes #7237
2016-07-08 11:45:05 -04:00
Brandy Carney
d01ee4b0ce fix(app): add status bar padding when tab subpages are hidden
closes #7203
2016-07-07 15:22:56 -04:00
Justin Willis
5bbe31a69f fix(loading): clear timeout if dismissed before timeout fires 2016-07-07 13:00:12 -05:00
Brandy Carney
6c6254c213 chore(tslint): fix linter errors 2016-07-07 13:11:41 -04:00
Brandy Carney
0d33adafe4 chore(sass): fix linter error 2016-07-07 13:09:52 -04:00
Brandy Carney
41064bf2be refactor(tabs): rename tab input/config options to be more clear/consistent
BREAKING CHANGES:

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.

references #7143
2016-07-07 13:09:00 -04:00
Justin Willis
580b8d5f0b fix(slides): delay loading slides until view ready
Closes #7089
2016-07-06 10:47:12 -05:00
Arvind Chembarpu
153aaaaa01 style(templates): fix style variations in tooling templates 2016-07-04 21:31:14 -05:00
Adam Bradley
816a6486b0 fix(button): apply css for buttons w/ ngIf
Closes #5927
2016-07-04 21:26:58 -05:00
Manu Mtz.-Almeida
cac1d4f961 fix(menu): getBackdropElement
references #7125
2016-07-02 17:30:37 +02:00
Manu Mtz.-Almeida
01c7c1ada7 docs(range): fix debounce input
closes #7168
2016-07-02 14:27:09 +02:00
Manu Mtz.-Almeida
8483a439ae fix(reorder): canceled reorder is animated smoothly back
references #7142
2016-07-02 11:33:16 +02:00
Adam Bradley
f1433c6314 refactor(backdrop): place disable-scroll class on ion-app 2016-07-01 21:44:53 -05:00
Adam Bradley
aebdf2f6e0 fix(bootstrap): return promise and resolve ionicBootstrap
Closes #7145
2016-07-01 20:39:09 -05:00
Adam Bradley
da6215c08e test(modal): add provider tests
Related #7160
2016-07-01 20:30:28 -05:00
Adam Bradley
e4bbcc667a fix(scroll): fix scrolling after switching tabs
Closes #7154
2016-07-01 20:13:49 -05:00
Adam Bradley
f02b6eae9a style(tab): fix scss lint errors 2016-07-01 20:11:41 -05:00
Mike Hartington
997d54eca9 fix(tabs): center tabbar content 2016-07-01 20:09:19 -05:00
Manu Mtz.-Almeida
f289ac6b25 fix(reorder): better style
- Small icon
- Not opaque

references #7142
2016-07-01 23:59:14 +02:00
Adam Bradley
d8782df933 chore(): remove old deprecated warnings 2016-07-01 01:11:45 -05:00
Adam Bradley
941cb1d196 fix(backdrop): use raf when adding/removing disable-scroll css 2016-07-01 01:08:48 -05:00
Adam Bradley
656426672c chore(templates): import required directives for ionic templates 2016-07-01 00:59:37 -05:00
Adam Bradley
009d5a980a chore(angular): update to angular 2.0.0-rc.4 2016-06-30 23:31:13 -05:00
Adam Bradley
4d56219a4c refactor(forms): upgrade to @angular/forms 2016-06-30 21:54:48 -05:00
Brandy Carney
9b2f4a682e chore(sass): fix linter errors 2016-06-30 16:44:10 -04:00
Brandy Carney
1fe1c1e291 feat(content): add a resize function to recalculate the content size
this should be called when dynamically displaying/hiding headers,
footers, or tabs.

references #7131
2016-06-30 16:32:45 -04:00
mhartington
cd6ad23ef3 docs(viewController, picker, popover, toast, gestures, utils): update docs 2016-06-30 15:50:26 -04:00
mhartington
fbe6f82c89 docs(alert, loading, modal): update docs 2016-06-30 15:02:19 -04:00
mhartington
df07682407 docs(alertController, navController): update docs 2016-06-30 13:46:09 -04:00
Adam Bradley
686c262c4c feat(footer): apply shadow on MD footer and tabbar bottom 2016-06-30 11:57:09 -05:00
Adam Bradley
845a516375 fix(activator): do not activate elements while scrolling
Closes #7141
2016-06-30 10:36:03 -05:00
Adam Bradley
0cb093e394 fix(animation): fix easing timing function
Closes #7130
2016-06-30 09:53:09 -05:00
Manu Mtz.-Almeida
267aa32f5a perf(animation): using will-change when using progressStep() 2016-06-30 08:17:17 -05:00
Manu Mtz.-Almeida
4e88f89161 fix(button): outline buttons do not have hairline borders in iOS 2016-06-30 08:13:18 -05:00
Adam Bradley
3b1d3b926e chore(viewcontroller): change onDismiss to private 2016-06-30 08:12:00 -05:00
Manu Mtz.-Almeida
ec99bfd019 feat(viewcontroller): add onWillDismiss callback
Fixed #6702
2016-06-30 08:06:19 -05:00
Adam Bradley
1c882b31a5 style(input): update import syntax 2016-06-29 22:42:22 -05:00
Adam Bradley
1f4b3e2cf0 feat(tabbar): apply shadow on MD tabbar top 2016-06-29 22:06:18 -05:00
Adam Bradley
0d8c947409 refactor(content): rename adjustedTop to contentTop
Closes #7112
2016-06-29 21:51:11 -05:00
Adam Bradley
7f83445b59 chore(contributing): update contributing guidelines 2016-06-29 21:34:42 -05:00
Adam Bradley
2d19308a52 fix(tabs): fix preloadTabs null element reference
Closes #7109
2016-06-29 21:15:33 -05:00
Adam Bradley
55a5e83020 fix(nav): fix menuCtrl reference in swipe back 2016-06-29 21:12:22 -05:00
Víctor Oliva
76619cf4d0 feat(select): add disabled status in select options 2016-06-29 20:01:03 -05:00
Manu Mtz.-Almeida
d993a1bfd8 fix(reorder): reorder can be used with any element 2016-06-30 01:14:21 +02:00
Brandy Carney
5119b57496 docs(segment): clean up docs on segment, update demo
the demo has been changed to show multiple segments in use, instead of
a lot of segments thrown on the page.

fixes driftyco/ionic-site#658
2016-06-29 17:16:02 -04:00
mhartington
d5959f4c44 docs(itemSliding): cleanup private methods 2016-06-29 15:33:41 -04:00
Manu Mtz.-Almeida
73580727ac fix(bootstrap): tapclick is injected, probably (#7128) 2016-06-29 15:27:22 -04:00
Adam Bradley
b0a1151a0f chore(readme): update npm readme 2016-06-29 14:02:41 -05:00
Brandy Carney
aad8f966a5 docs(demos): change the dot in item-reorder 2016-06-29 14:50:24 -04:00
Adam Bradley
9c896f59bc chore(package): generate dist package.json from root package.json
Closes #6854
2016-06-29 13:44:36 -05:00
Brandy Carney
1cad300622 docs(demo): update item reorder demo to use a playlist 2016-06-29 14:35:42 -04:00
Brandy Carney
204c517e2a docs(item-reorder): modify docs for item reorder
also added the header to the reorder test.
2016-06-29 14:02:52 -04:00
Brandy Carney
2fc83c40d3 refactor(item): rename indices to indexes 2016-06-29 14:02:52 -04:00
Adam Bradley
37c53ac07c style(scss): fix scss lint errors 2016-06-29 11:44:51 -05:00
Brandy Carney
1c2acc0c6a test(content): add tests for content pages without header/footers 2016-06-29 12:31:54 -04:00
Adam Bradley
6fa2faffba feat(header): apply shadow on MD headers 2016-06-29 11:26:38 -05:00
Manu Mtz.-Almeida
08f22fb82b docs(reorder): adds docs and demo for reorder directive 2016-06-29 17:35:33 +02:00
Adam Bradley
b615c60478 fix(loading): fix loading overlay during app init
Closes #6209
2016-06-29 00:27:50 -05:00
Adam Bradley
3fb58d95c3 demo(overlay): use injectable overlay controllers 2016-06-28 20:46:43 -05:00
Manu Mtz.-Almeida
7aa559aec2 fix(item): sliding item is closed when tapped
closes #7094
2016-06-29 02:30:16 +02:00
Adam Bradley
4fff262684 fix(datetime): format seconds token
Closes #6951
2016-06-28 16:40:42 -05:00
Adam Bradley
3cd31c3d17 fix(menu): fix content going under header
Closes #7084
2016-06-28 16:22:39 -05:00
Adam Bradley
4980659bd6 test(overlay): use injectable overlay controllers 2016-06-28 15:20:42 -05:00
Adam Bradley
215c6d846c refactor(overlays): inject overlay providers
BREAKING CHANGES:

- Overlay components, such as Alert or Modals, should now be created
using its injected provider.
- Overlays now have the `present()` method on the overlay’s 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(private nav: NavController) {
}

doAlert() {
  let alert = Alert.create({
    title: 'Alert',
  });
  this.nav.present(alert);
}
```

NOW:

```
import { AlertController } from ‘ionic-angular’;

constructor(private alertCtrl: AlertController) {
}

doAlert() {
  let alert = this.alertCtrl.create({
    title: 'Alert'
  });
  alert.present();
}
```
2016-06-28 15:18:09 -05:00
Adam Bradley
2fe42ed63e chore(): clean up unused references 2016-06-28 11:28:25 -05:00
Edd Hannay
721b2bc4f0 demos(loading): update demo to beta10 2016-06-28 09:42:05 -05:00
Brandy Carney
29dd8da3b4 chore(changelog): fix npm install to use beta 10 instead of nightly 2016-06-28 10:31:10 -04:00
Manu Mtz.-Almeida
5c804450c4 feat(ion-content): iOS only scroll bounce 2016-06-27 22:26:48 -05:00
Perry Govier
d458b1ec90 chore(ci): kicking the tires 2016-06-27 16:22:37 -05:00
Brandy Carney
e9226178dc chore(ionic): release beta.10 2016-06-27 15:40:44 -04:00
1120 changed files with 43030 additions and 30655 deletions

View File

@@ -1,40 +1,140 @@
# Contributing
### Creating an Issue
If you have a question on how something works, or its expected functionality, you might want to visit the [Ionic Forum](http://forum.ionicframework.com/) first.
If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported](https://github.com/driftyco/ionic/issues?state=open). You can search through existing issues to see if someone's reported one similar to yours.
If not, then [create a codepen.io](http://codepen.io/ionic/public-list) that demonstrates the problem (try to use as little code as possible: the more minimalist, the faster we can debug it). Also, please do not group multiple topics into one issue, but instead each should be its own issue.
Next, [create a new issue](https://github.com/driftyco/ionic/issues/new) that thoroughly explains the problem, how to reproduce the issue, and provide any additional information such as code examples and error logs.
Thanks for your interest in contributing to the Ionic Framework! :tada:
### Issue Etiquette Guidelines
## Contributing Etiquette
Poor attitude, ranting, name-calling, bullying, being a jerk, complaining, or spamming are fruitless and unacceptable. Issues that violate the open source spirit of this community, or any of the guidelines listed here, may result in your Issue being deleted or reposted to our Forum, a better place for debate and discussion. If you wish to contribute, either make your response respectful or do not bother to respond. Youll find its pretty ineffective.
Simply put: be respectful and act like an adult. Critiques are better made on the Forum. If you cant do that, this isnt a community for you.
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.
### Pull Request Guidelines
## Creating an Issue
When in doubt, keep your pull requests small. To give a PR the best chance of getting accepted, do not bundle more than one "feature" or bug fix per PR. Doing so makes it very hard to accept it if one of the fixes has issues.
If you have a question about using the framework, please ask on the [Ionic Forum](http://forum.ionicframework.com/) or in the [Ionic Worldwide Slack](http://ionicworldwide.herokuapp.com/) group.
It's always best to create two smaller PRs than one big one.
If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported](https://github.com/driftyco/ionic/issues?utf8=%E2%9C%93&q=is%3Aissue). You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
### Style
Next, [create a new issue](https://github.com/driftyco/ionic/issues/new) that thoroughly explains the problem. Please fill out the populated issue form before submitting the issue.
Always use two spaces, no tabs. This goes for any HTML, CSS, or Javascript.
### License
## Creating a Pull Request
We appreciate you taking the time to contribute! Before submitting a pull request, we ask that you please [create an issue](#creating-an-issue) that explains the bug or feature request and let us know that you plan on creating a pull request for it. If an issue already exists, please comment on that issue letting us know you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort.
Looking for an issue to fix? Make sure to look through our issues with the [help wanted](https://github.com/driftyco/ionic/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label!
### Setup
1. Fork the repo.
2. Clone your fork.
3. Make a branch for your change.
4. Run `npm install` (make sure you have [node](https://nodejs.org/en/) and [npm](http://blog.npmjs.org/post/85484771375/how-to-install-npm) installed first)
### Modifying Components
1. Make any changes to the component.
2. Modify the e2e test in the `test/` directory under the component directory, if possible. If the test does not exist and it is possible to show the change, please create a new test in a directory called `basic/`.
#### TypeScript Changes
1. If there is a `*.spec.ts` file located in the `test/` folder, update it to include a karma test for your change, if needed. If this file doesn't exist, please notify us.
2. Run `gulp karma` to make sure all tests are working, regardless if a test was added.
3. Run `gulp tslint` and fix any linter errors.
#### Sass Changes
1. If the css property is something that the user may want to override and it won't break the component layout, it should be given a Sass variable. See our [doc on naming Sass variables](https://docs.google.com/document/d/1OyOyrRE5lpB_9mdkF0HWVQLV97fHma450N8XqE4mjZQ/edit?usp=sharing).
2. After any changes to the Sass files run the [Sass Linter](https://github.com/brigade/scss-lint), and fix any linter errors:
- Requires [Ruby](https://www.ruby-lang.org/en/documentation/installation/). **Skip this step entirely if you are unable to install Ruby.**
- Install the linter: `gem install scss_lint`
- Make sure to run the linter at the root of the repository.
- To check all component Sass files: `scss-lint ionic/**/**/*.scss`
- To check a specific Sass file: `scss-lint src/components/toolbar/toolbar.ios.scss`
#### Viewing Changes
1. Run the gulp watch task for e2e tests: `gulp watch.e2e`
2. Launch your browser and navigate to `http://localhost:8000/dist/e2e`
3. From here, navigate to the component you are changing.
4. Any changes to the e2e tests in the `test/` directory will show here.
5. If your changes look good, you're ready to [commit](#committing)!
#### Adding Documentation
1. To add or modify API Documentation for a component, it should be added/changed in the component's TypeScript (`*.ts`) file, prior to the Class definition. For example, `Badge` looks similar to this:
```
/**
* @name Badge
* @module ionic
* @description
* Badges are simple components in Ionic containing numbers or text.
*
* @see {@link /docs/v2/components/#badges Badges Component Docs}
* @demo /docs/v2/demos/badge/
**/
```
where `@name` is the Class name, `@description` is the description displayed on the documentation page, `@see` links to any related pages, and `@demo` links to the API demo located in the `demos` folder.
2. In order to run API documentation locally, you will need to clone the `ionic-site` repo as a sibling to the `ionic` repo and then run it: https://github.com/driftyco/ionic-site#local-build
3. Then, run `gulp docs` in the `ionic` repo every time you make a change and the site will update.
4. If the change affects the component documentation, create an issue on the `ionic-site` repo: https://github.com/driftyco/ionic-site/issues
#### Adding Demos
1. Create or modify the demo in the `demos/` folder.
2. If it is new, link to the demo in the component's TypeScript (`*.ts`) file (under `src/components`) by adding a link to it in the documentation using `@demo`, for example:
```
/**
* @name Badge
*
* ...
*
* @demo /docs/v2/demos/src/badge/
**/
```
3. Run `gulp watch.demos` to watch for changes to the demo
4. Navigate to `http://localhost:8000/dist/demos/` and then to your component's demo to view it.
5. If the change affects the component demos, create an issue on the `ionic-site` repo: https://github.com/driftyco/ionic-site/issues
## Commit Message Format
We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the our change log. (Ok you got us, it's basically Angular's commit message format).
`type(scope): subject`
#### Type
Must be one of the following:
* **fix**: A bug fix
* **feat**: A new feature
* **docs**: Documentation only changes
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **perf**: A code change that improves performance
* **test**: Adding missing tests
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
#### Scope
The scope could be anything specifying place of the commit change. For example `alert`, `button`, `menu`, `nav`, etc...
#### Subject
The subject contains succinct description of the change:
* use the imperative, present tense: "change" not "changed" nor "changes"
* do not capitalize first letter
* do not place a period (.) at the end
* entire length of the commit message must not go over 50 characters
## License
By contributing your code to the driftyco/ionic GitHub Repository, you agree to license your contribution under the MIT license.
## Ionic 1.x
Please read the contributing guide on the ionic website: http://ionicframework.com/contribute/
## Ionic 2.x
See the Ionic 2 [CONTRIBUTING](https://github.com/driftyco/ionic/blob/2.0/CONTRIBUTING.md) file.

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,925 @@
<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)
### BREAKING CHANGES
- `ion-content` now takes up 100% of the viewport height, but it has margin added to the top and bottom to adjust for headers, footers, and tabs.
- `ion-content` now accepts `fullscreen` as an attribute to to tell the content to scroll behind the header. This allows for transparent toolbars and tab pages without navbars!
- `ion-navbar` no longer has the `*navbar` attribute.
- `ion-navbar` should now be wrapped in an `ion-header`
```
<ion-header>
<ion-navbar></ion-navbar>
</ion-header>
```
- `ios` only: `ion-toolbar`/`ion-navbar` will always have borders to both the top and bottom of the element. Use the attributes `no-border-top` and `no-border-bottom` to remove the respective borders.
- An `ion-nav` or `ion-tabs` is required in the root component. If one of these does not exist your content may be pushed up behind your header.
- The `position` attribute has been removed from the `ion-toolbar`, it should now be placed in an `ion-header` or an `ion-footer`. It can also be placed inside of an `ion-content`.
- The only elements that should be children of a page are `ion-header`, `ion-content`, and `ion-footer`.
#### Steps to Upgrade to Beta 10
1. Run the following command from your command prompt/terminal to update to the latest version of the Ionic framework 2:
```
npm install --save ionic-angular@2.0.0-beta.10 @angular/common@2.0.0-rc.3 @angular/compiler@2.0.0-rc.3 @angular/platform-browser@2.0.0-rc.3 @angular/platform-browser-dynamic@2.0.0-rc.3 @angular/http@2.0.0-rc.3 @angular/core@2.0.0-rc.3 @angular/router@2.0.0-rc.2
```
2. Remove the `*navbar` attribute so this:
```
<ion-navbar *navbar>
```
becomes this:
```
<ion-navbar>
```
3. Wrap any toolbars/navbars above the `ion-content` in an `ion-header`. The following:
```
<ion-navbar>
<ion-title>
Navbar Title
</ion-title>
</ion-navbar>
<ion-toolbar>
<ion-title>
Toolbar Title
</ion-title>
</ion-toolbar>
<ion-content>
</ion-content>
```
becomes:
```
<ion-header>
<ion-navbar>
<ion-title>
Navbar Title
</ion-title>
</ion-navbar>
<ion-toolbar>
<ion-title>
Toolbar Title
</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
</ion-content>
```
4. Wrap any toolbars/navbars after the `ion-content` in an `ion-footer`. The following:
```
<ion-content>
</ion-content>
<ion-toolbar position="bottom">
<ion-title>Footer Toolbar</ion-title>
</ion-toolbar>
```
becomes:
```
<ion-content>
</ion-content>
<ion-footer>
<ion-toolbar>
<ion-title>Footer Toolbar</ion-title>
</ion-toolbar>
</ion-footer>
```
### Bug Fixes
* **animation:** correctly apply will-change: transform ([a1223da](https://github.com/driftyco/ionic/commit/a1223da))
* **bootstrap:** only add customProviders when present ([0e9e85c](https://github.com/driftyco/ionic/commit/0e9e85c))
* **content:** adjust footer bottom based on the tabbar without padding ([4567de2](https://github.com/driftyco/ionic/commit/4567de2))
* **content:** set footer height to 0 so it won't be undefined ([3db67f9](https://github.com/driftyco/ionic/commit/3db67f9))
* **cordova:** fix the status bar padding with the new structure ([15642e4](https://github.com/driftyco/ionic/commit/15642e4))
* **demos:** updates @angular paths ([b7826ba](https://github.com/driftyco/ionic/commit/b7826ba))
* **footer:** show footer toolbar w/ tabbar bottom ([99c50a1](https://github.com/driftyco/ionic/commit/99c50a1))
* **generator:** fix closing tag for header ([47e09a1](https://github.com/driftyco/ionic/commit/47e09a1))
* **header:** optional ViewController injection ([5a85d82](https://github.com/driftyco/ionic/commit/5a85d82))
* **input:** allow button click when input has focus ([ae86ab8](https://github.com/driftyco/ionic/commit/ae86ab8)), closes [#6514](https://github.com/driftyco/ionic/issues/6514) [#6944](https://github.com/driftyco/ionic/issues/6944)
* **input:** check if there is a value when setting value ([d0b1930](https://github.com/driftyco/ionic/commit/d0b1930))
* **input:** fix the clear input button to always be vertically aligned ([e4cc672](https://github.com/driftyco/ionic/commit/e4cc672))
* **item:** inherit overflow and text-overflow from the parent item in a paragraph ([4009575](https://github.com/driftyco/ionic/commit/4009575))
* **item:** listEle does not longer exist ([22fad4c](https://github.com/driftyco/ionic/commit/22fad4c))
* **item:** sliding item works with and without borders ([2303c16](https://github.com/driftyco/ionic/commit/2303c16)), closes [#7081](https://github.com/driftyco/ionic/issues/7081)
* **item:** sliding items don't fire (click) when swiped ([38ab17b](https://github.com/driftyco/ionic/commit/38ab17b))
* **modal:** add class name to modal ([6e34739](https://github.com/driftyco/ionic/commit/6e34739)), closes [#7000](https://github.com/driftyco/ionic/issues/7000)
* **nav:** auto set iOS black transition bg via css ([7842991](https://github.com/driftyco/ionic/commit/7842991))
* **picker:** adds align to the PickerColumn interface ([b8551de](https://github.com/driftyco/ionic/commit/b8551de))
* **refresher:** adjust location after layout updates ([603000f](https://github.com/driftyco/ionic/commit/603000f))
* **refresher:** only listen for mousemove/touchmove when needed ([1a58a41](https://github.com/driftyco/ionic/commit/1a58a41))
* **tabs:** don't add outline to the class name if it is a logo icon ([af22287](https://github.com/driftyco/ionic/commit/af22287)), closes [#6899](https://github.com/driftyco/ionic/issues/6899)
* **tabs:** fix tabs rootNav ([ae40edf](https://github.com/driftyco/ionic/commit/ae40edf))
* **tabs:** hide tab's navbar when a page comes without a navbar ([2d68089](https://github.com/driftyco/ionic/commit/2d68089)), closes [#5556](https://github.com/driftyco/ionic/issues/5556)
* **tabs:** reference parent instead of parentTabs ([ed6d0fa](https://github.com/driftyco/ionic/commit/ed6d0fa))
* **tabs:** swipeBackEnabled works with tabs as expected ([2bff535](https://github.com/driftyco/ionic/commit/2bff535))
* **toggle:** host listeners are not longer needed ([4aa322d](https://github.com/driftyco/ionic/commit/4aa322d))
* **toolbar:** place iOS border on ion-header/footer ([48c1ffd](https://github.com/driftyco/ionic/commit/48c1ffd))
* **toolbar:** position toolbar relative and add z-index ([1d8ba4a](https://github.com/driftyco/ionic/commit/1d8ba4a))
* **virtualScroll:** first node should use clientTop/clientLeft ([2197d49](https://github.com/driftyco/ionic/commit/2197d49))
### Features
* **feature-detect:** detect if backdrop-filter is supported ([89564f1](https://github.com/driftyco/ionic/commit/89564f1))
* **fullscreen:** add fullscreen property to ion-content ([f20c7e4](https://github.com/driftyco/ionic/commit/f20c7e4))
* **item:** sliding items work with list reorder ([bfdc898](https://github.com/driftyco/ionic/commit/bfdc898))
* **list:** add list headers and item dividers as items ([712ff81](https://github.com/driftyco/ionic/commit/712ff81)), closes [#5561](https://github.com/driftyco/ionic/issues/5561)
* **list:** reorder list items ([5c38921](https://github.com/driftyco/ionic/commit/5c38921))
* **range:** add debounce input for ionChange event ([55eccb3](https://github.com/driftyco/ionic/commit/55eccb3)), closes [#6894](https://github.com/driftyco/ionic/issues/6894)
* **toolbar:** control toolbar borders on top/bottom ([3a7addf](https://github.com/driftyco/ionic/commit/3a7addf))
### Performance Improvements
* **reorder:** hit test refactored ([6a52a4a](https://github.com/driftyco/ionic/commit/6a52a4a))
<a name="2.0.0-beta.9"></a>
# [2.0.0-beta.9](https://github.com/driftyco/ionic/compare/v2.0.0-beta.8...v2.0.0-beta.9) (2016-06-16)
@@ -8,27 +930,27 @@
- Searchbar's events no longer emit the Searchbar itself, they now emit the input's `$event` for each native input event. Instead of grabbing the value from the searchbar, you should grab it from the event target. For example:
Previously when an event was called the function called would look similar to this:
```
getItems(searchbar) {
// set q to the value of the searchbar input
var q = searchbar.value;
}
```
Now it should be similar to this:
```
getItems(ev) {
// set q to the value of the searchbar input
var q = ev.target.value;
}
```
- `ngModel` is no longer required on Searchbar, but it can still be used. You can get the value of the input through Searchbar's [Output Events](http://ionicframework.com/docs/v2/api/components/searchbar/Searchbar/#output-events).
- Added the ability to pass `autocomplete`, `autocorrect`, `spellcheck`, and `type` to the searchbar which is passed to the input.
- The `hideCancelButton` attribute was removed in favor of `showCancelButton` which is set to `false` by default.
### Features

View File

@@ -1,115 +0,0 @@
# Contributing
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.
## Creating an Issue
If you have a question about using the framework, please ask on the [Ionic Forum](http://forum.ionicframework.com/) or in the [Ionic Worldwide Slack](http://ionicworldwide.herokuapp.com/) group.
If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported](https://github.com/driftyco/ionic/issues?utf8=%E2%9C%93&q=is%3Aissue). You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
Next, [create a new issue](https://github.com/driftyco/ionic/issues/new) that thoroughly explains the problem. Please fill out the populated issue form before submitting the issue.
## Creating a Pull Request
We appreciate you taking the time to contribute! Before submitting a pull request, we ask that you please [create an issue](#creating-an-issue) that explains the bug or feature request and let us know that you plan on creating a pull request for it. If an issue already exists, please comment on that issue letting us know you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort.
Looking for an issue to fix? Make sure to look through our issues with the [help wanted](https://github.com/driftyco/ionic/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label!
### Setup
1. Fork the repo.
2. Clone your fork.
3. Make a branch for your change.
4. Run `npm install` (make sure you have [node](https://nodejs.org/en/) and [npm](http://blog.npmjs.org/post/85484771375/how-to-install-npm) installed first)
### Modifying Components
1. Make any changes to the component.
2. Modify the e2e test in the `test/` directory under the component directory, if possible. If the test does not exist and it is possible to show the change, please create a new test in a directory called `basic/`.
#### TypeScript Changes
1. If there is a `*.spec.ts` file located in the `test/` folder, update it to include a karma test for your change, if needed. If this file doesn't exist, please notify us.
2. Run `gulp karma` to make sure all tests are working, regardless if a test was added.
3. Run `gulp tslint` and fix any linter errors.
#### Sass Changes
1. If the css property is something that the user may want to override and it won't break the component layout, it should be given a Sass variable. See our [doc on naming Sass variables](https://docs.google.com/document/d/1OyOyrRE5lpB_9mdkF0HWVQLV97fHma450N8XqE4mjZQ/edit?usp=sharing).
2. After any changes to the Sass files run the [Sass Linter](https://github.com/brigade/scss-lint), and fix any linter errors:
- Requires [Ruby](https://www.ruby-lang.org/en/documentation/installation/). **Skip this step entirely if you are unable to install Ruby.**
- Install the linter: `gem install scss_lint`
- Make sure to run the linter at the root of the repository.
- To check all component Sass files: `scss-lint ionic/**/**/*.scss`
- To check a specific Sass file: `scss-lint src/components/toolbar/toolbar.ios.scss`
#### Viewing Changes
1. Run the gulp watch task for e2e tests: `gulp watch.e2e`
2. Launch your browser and navigate to `http://localhost:8000/dist/e2e`
3. From here, navigate to the component you are changing.
4. Any changes to the e2e tests in the `test/` directory will show here.
5. If your changes look good, you're ready to [commit](#committing)!
#### Adding Documentation
1. To add or modify API Documentation for a component, it should be added/changed in the component's TypeScript (`*.ts`) file, prior to the Class definition. For example, `Badge` looks similar to this:
```
/**
* @name Badge
* @module ionic
* @description
* Badges are simple components in Ionic containing numbers or text.
*
* @see {@link /docs/v2/components/#badges Badges Component Docs}
* @demo /docs/v2/demos/badge/
**/
```
where `@name` is the Class name, `@description` is the description displayed on the documentation page, `@see` links to any related pages, and `@demo` links to the API demo located in the `demos` folder.
2. In order to run API documentation locally, you will need to clone the `ionic-site` repo as a sibling to the `ionic` repo and then run it: https://github.com/driftyco/ionic-site#local-build
3. Then, run `gulp docs` in the `ionic` repo every time you make a change and the site will update.
4. If the change affects the component documentation, create an issue on the `ionic-site` repo: https://github.com/driftyco/ionic-site/issues
#### Adding Demos
1. Create or modify the demo in the `demos/` folder.
2. If it is new, link to the demo in the component's TypeScript (`*.ts`) file (under `src/components`) by adding a link to it in the documentation using `@demo`, for example:
```
/**
* @name Badge
*
* ...
*
* @demo /docs/v2/demos/badge/
**/
```
3. Run `gulp watch.demos` to watch for changes to the demo
4. Navigate to `http://localhost:8000/dist/demos/` and then to your component's demo to view it.
5. If the change affects the component demos, create an issue on the `ionic-site` repo: https://github.com/driftyco/ionic-site/issues
### Committing
1. Install [Commitizen](https://github.com/commitizen/cz-cli#installing-the-command-line-tool) (add sudo if on OSX/Linux): `npm install -g commitizen`
2. Use commitizen to commit instead of `git commit`: `git cz`
3. This will prompt you with questions and commit when you are finished.
4. Submit the Pull Request!
## License
By contributing your code to the driftyco/ionic GitHub Repository, you agree to license your contribution under the MIT license.

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.
@@ -14,8 +14,9 @@ To try Ionic 2 today, visit the [Ionic 2 Docs](http://ionicframework.com/docs/v2
### Contributing to Ionic 2
See [CONTRIBUTING.md](https://github.com/driftyco/ionic/blob/2.0/CONTRIBUTING.md)
See [CONTRIBUTING.md](https://github.com/driftyco/ionic/blob/master/.github/CONTRIBUTING.md)
### Ionic 2 Examples
There are a few real Ionic 2 apps in the wild. The most complete is the [Ionic Conference App](https://github.com/driftyco/ionic-conference-app), a perfect starting point for building your own conference app.

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 checked>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,84 +0,0 @@
import { Component } from '@angular/core';
import { Animation, Config, IonicApp, ionicBootstrap, Modal, NavController, NavParams, Platform, ViewController } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
export class ModalFirstPage {
myParam = '';
constructor(public nav: NavController) {}
openBasicModal() {
let myModal = Modal.create(ModalContentPage);
this.nav.present(myModal);
}
openModalWithParams() {
let myModal = Modal.create(ModalContentPage, { 'myParam': this.myParam });
this.nav.present(myModal);
}
openCustomAnimationModal() {
let myModal = Modal.create(ModalContentPage, {
animation: 'my-fade-in',
});
this.nav.present(myModal);
}
}
@Component({
templateUrl: "modal-content.html"
})
export class ModalContentPage {
myParam: string;
constructor(
public nav: NavController,
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, leavingView) {
super(enteringView.pageRef());
this
.easing('ease')
.duration(1000)
.fromTo('translateY', '0%', '0%')
.fadeIn()
.before.addClass('show-page');
}
}
Animation.register('my-fade-in', FadeIn);
class FadeOut extends Animation {
constructor(enteringView, leavingView) {
super(leavingView.pageRef());
this
.easing('ease')
.duration(500)
.fadeOut()
.before.addClass('show-page');
}
}
Animation.register('my-fade-out', FadeOut);

View File

@@ -1,39 +0,0 @@
import { Component } from '@angular/core';
import { ionicBootstrap, NavController, NavParams } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
export class ApiDemoPage {
myParam: string = '';
constructor(public nav: NavController) {}
pushParams() {
this.nav.push(PushPage, { 'myParam': this.myParam });
}
}
@Component({
templateUrl: "page.html"
})
export class PushPage {
myParam: string;
constructor(public nav: NavController, params: NavParams) {
this.myParam = params.get('myParam');
}
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

View File

@@ -1,48 +0,0 @@
import { Component } from '@angular/core';
import { Config, ionicBootstrap, NavController, NavParams, Platform } from 'ionic-angular';
var PAGE_NUM = 2;
@Component({
templateUrl: 'main.html'
})
export class ApiDemoPage {
constructor(public nav: NavController) {}
push() {
this.nav.push(PushPage);
}
}
@Component({
templateUrl: "page.html"
})
export class PushPage {
pageNum = PAGE_NUM;
constructor(private nav: NavController) {}
push() {
PAGE_NUM++;
this.nav.push(PushPage);
}
pop() {
if (PAGE_NUM > 2) {
PAGE_NUM--;
}
this.nav.pop();
}
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

View File

@@ -1,32 +0,0 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
class ApiDemoPage {
appType = "paid";
safari = "links";
news = "local";
favorites = "recent";
purchased = "all";
mapStyle = "sat";
teslaModels = "X";
pet = "puppies";
calendar = "day";
proxy = "auto";
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);

View File

@@ -1,147 +0,0 @@
<ion-header>
<ion-navbar>
<ion-title>Segment</ion-title>
</ion-navbar>
<ion-toolbar no-border-top>
<ion-segment [(ngModel)]="appType">
<ion-segment-button value="paid">
Paid
</ion-segment-button>
<ion-segment-button value="free">
Free
</ion-segment-button>
<ion-segment-button value="top">
Top
</ion-segment-button>
</ion-segment>
</ion-toolbar>
<ion-toolbar no-border-top>
<ion-segment [(ngModel)]="news" secondary>
<ion-segment-button value="worldwide">
Worldwide
</ion-segment-button>
<ion-segment-button value="local">
Local
</ion-segment-button>
<ion-segment-button value="headlines">
Headlines
</ion-segment-button>
</ion-segment>
</ion-toolbar>
<ion-toolbar no-border-top>
<ion-segment [(ngModel)]="safari" dark class="icon-segment-demo">
<ion-segment-button value="bookmarks">
<ion-icon name="book"></ion-icon>
</ion-segment-button>
<ion-segment-button value="history">
<ion-icon ios="ios-glasses-outline" md="md-glasses"></ion-icon>
</ion-segment-button>
<ion-segment-button value="links">
<ion-icon ios="ios-at-outline" md="md-at"></ion-icon>
</ion-segment-button>
</ion-segment>
</ion-toolbar>
<ion-toolbar no-border-top>
<ion-segment [(ngModel)]="favorites" danger>
<ion-segment-button value="featured">
Featured
</ion-segment-button>
<ion-segment-button value="recent">
Recent
</ion-segment-button>
</ion-segment>
</ion-toolbar>
</ion-header>
<ion-content padding>
<p>Segments can be placed in a toolbar or anywhere in the content.</p>
<ion-segment [(ngModel)]="purchased" primary margin-bottom>
<ion-segment-button value="all">
All
</ion-segment-button>
<ion-segment-button value="not">
Not on This Phone
</ion-segment-button>
</ion-segment>
<ion-segment [(ngModel)]="mapStyle" secondary margin-bottom>
<ion-segment-button value="standard">
Standard
</ion-segment-button>
<ion-segment-button value="hybrid">
Hybrid
</ion-segment-button>
<ion-segment-button value="sat">
Satellite
</ion-segment-button>
</ion-segment>
<ion-segment [(ngModel)]="teslaModels" danger margin-bottom>
<ion-segment-button value="S">
Model S
</ion-segment-button>
<ion-segment-button value="X">
Model X
</ion-segment-button>
<ion-segment-button value="3">
Model 3
</ion-segment-button>
</ion-segment>
</ion-content>
<ion-footer>
<ion-toolbar no-border-bottom primary>
<ion-segment [(ngModel)]="pet" light>
<ion-segment-button value="puppies">
Puppies
</ion-segment-button>
<ion-segment-button value="kittens">
Kittens
</ion-segment-button>
<ion-segment-button value="ducklings">
Ducklings
</ion-segment-button>
</ion-segment>
</ion-toolbar>
<ion-toolbar no-border-bottom dark>
<ion-segment [(ngModel)]="calendar" primary>
<ion-segment-button value="list">
List
</ion-segment-button>
<ion-segment-button value="day">
Day
</ion-segment-button>
<ion-segment-button value="month" checked>
Month
</ion-segment-button>
</ion-segment>
</ion-toolbar>
<ion-toolbar no-border-bottom danger>
<ion-segment [(ngModel)]="proxy" light>
<ion-segment-button value="off">
Off
</ion-segment-button>
<ion-segment-button value="manual">
Manual
</ion-segment-button>
<ion-segment-button value="auto">
Auto
</ion-segment-button>
</ion-segment>
</ion-toolbar>
</ion-footer>

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,16 +1,14 @@
import { Component } from '@angular/core';
import { ActionSheet, ionicBootstrap, NavController, Platform } from 'ionic-angular';
import { ActionSheetController, Platform } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
templateUrl: 'page.html'
})
export class ApiDemoPage {
constructor(public nav: NavController, public platform: Platform) { }
constructor(public alertCtrl: ActionSheetController, public platform: Platform) { }
present() {
let actionSheet = ActionSheet.create({
let actionSheet = this.alertCtrl.create({
title: 'Albums',
buttons: [
{
@@ -53,7 +51,7 @@ export class ApiDemoPage {
]
});
this.nav.present(actionSheet);
actionSheet.present();
}
}
@@ -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 { Alert, ionicBootstrap, NavController } from 'ionic-angular';
import { AlertController } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
templateUrl: 'page.html'
})
export class ApiDemoPage {
testRadioOpen = false;
@@ -12,22 +11,22 @@ export class ApiDemoPage {
testCheckboxOpen = false;
testCheckboxResult: any;
constructor(public nav: NavController) {}
constructor(public alertCtrl: AlertController) {}
doAlert() {
let alert = Alert.create({
let alert = this.alertCtrl.create({
title: 'New Friend!',
subTitle: 'Your friend, Obi wan Kenobi, just accepted your friend request!',
buttons: ['Ok']
});
this.nav.present(alert);
alert.present();
}
doConfirm() {
let alert = Alert.create({
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',
@@ -44,13 +43,13 @@ export class ApiDemoPage {
]
});
this.nav.present(alert);
alert.present();
}
doPrompt() {
let alert = Alert.create({
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',
@@ -60,24 +59,24 @@ export class ApiDemoPage {
buttons: [
{
text: 'Cancel',
handler: data => {
handler: (data: any) => {
console.log('Cancel clicked');
}
},
{
text: 'Save',
handler: data => {
handler: (data: any) => {
console.log('Saved clicked');
}
}
]
});
this.nav.present(alert);
alert.present();
}
doRadio() {
let alert = Alert.create();
let alert = this.alertCtrl.create();
alert.setTitle('Lightsaber color');
alert.addInput({
@@ -126,18 +125,18 @@ export class ApiDemoPage {
alert.addButton('Cancel');
alert.addButton({
text: 'Ok',
handler: data => {
handler: (data: any) => {
console.log('Radio data:', data);
this.testRadioOpen = false;
this.testRadioResult = data;
}
});
this.nav.present(alert);
alert.present();
}
doCheckbox() {
let alert = Alert.create();
let alert = this.alertCtrl.create();
alert.setTitle('Which planets have you visited?');
alert.addInput({
@@ -198,24 +197,22 @@ export class ApiDemoPage {
alert.addButton('Cancel');
alert.addButton({
text: 'Okay',
handler: data => {
handler: (data: any) => {
console.log('Checkbox data:', data);
this.testCheckboxOpen = false;
this.testCheckboxResult = data;
}
});
this.nav.present(alert);
alert.present();
}
}
@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,28 +80,33 @@ export class TabPage {
@Component({
templateUrl: 'main.html'
templateUrl: 'page.html'
})
export class ApiDemoPage {
config: any;
initialConfig: any;
constructor(public platform: Platform, public nav: NavController) {
constructor(public platform: Platform, public navCtrl: NavController) {
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',
'tabbarPlacement': 'bottom'
'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',
'tabbarPlacement': 'top'
'tabsPlacement': 'bottom'
};
}
@@ -113,18 +119,18 @@ export class ApiDemoPage {
}
push() {
this.nav.push(PushPage);
this.navCtrl.push(PushPage);
}
}
@Component({
templateUrl: 'page.html'
templateUrl: 'push-page.html'
})
export class PushPage {
constructor(public nav: NavController) {}
constructor(public navCtrl: NavController) {}
pop() {
this.nav.pop();
this.navCtrl.pop();
}
}
@@ -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

@@ -31,7 +31,7 @@
<ion-item>
<ion-label>Tab Placement</ion-label>
<ion-select [(ngModel)]="config.tabbarPlacement">
<ion-select [(ngModel)]="config.tabsPlacement">
<ion-option value="bottom">bottom</ion-option>
<ion-option value="top">top</ion-option>
</ion-select>
@@ -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}}"
tabbarPlacement: "{{initialConfig.tabbarPlacement}}"
});</pre>
tabsPlacement: "{{initialConfig.tabsPlacement}}"
});--></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,8 +1,10 @@
<ion-menu #menu [content]="content">
<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar color="secondary">
<ion-title>Left Menu</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
@@ -11,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>
@@ -25,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>

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