Ionic
Ionic is an open source app development toolkit for building modern, fast, top-quality cross-platform native and Progressive Web Apps from a single codebase with JavaScript and the Web.
Ionic is based on Web Components, which enables significant performance, usability, and feature improvements alongside support for popular web frameworks like Angular, React, and Vue.
Quickstart · Documentation · Contribute · Blog
Community: Discord · Forums · Twitter
Packages
Project | Package | Version | Downloads | Links |
---|---|---|---|---|
Core | @ionic/core |
README.md |
||
Angular | @ionic/angular |
README.md |
||
Vue | @ionic/vue |
README.md |
||
React | @ionic/react |
README.md |
Looking for the ionic-angular
package? Ionic 3 has been moved to the ionic-v3
repo. See Earlier Versions.
Getting Started
Start a new project by following our quick Getting Started guide. We would love to hear from you! If you have any feedback or run into issues using our framework, please file an issue on this repository.
Migration Guides
Already have an Ionic app? These guides will help you migrate to the latest versions.
Examples
The Ionic Conference App is a full featured Ionic app. It is the perfect starting point for learning and building your own app.
Contributing
Thanks for your interest in contributing! Read up on our guidelines for contributing and then look through our issues with a help wanted label.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Future Goals
As Ionic Framework components migrate to the web component standard, a goal of ours is to have Ionic Framework easily work within all of the popular frameworks.
Earlier Versions
The source code for earlier versions of the Ionic Framework may exist in other repositories. Please open issues and pull requests in their respective repositories.
- Ionic 2/3: Moved to
ionic-team/ionic-v3
- Ionic 1: Moved to
ionic-team/ionic-v1
Speed up initial loading
We're developing an app which is partially native and partially hybrid. We will open cordova activity when user clicks on an menu item and finish the activity when user clicks back. Problem with this approach is, it takes a while to render on the screen for first time. We are hosting all the resource files in the assets folder so caching doesn't make much sense. Is there any progressive way to load the application?
Ionic 4 won't work in android 5
Bug Report
Ionic Info Run
ionic info
from a terminal/cmd prompt and paste the output below.Describe the Bug When I do
ionic serve
and open it in Android Lollipop's browser, Its giving below error.Uncaught SyntaxError: Use of const in strict mode. vendor.js:71605
bug: White flash appearing when switching between tabs on Android
Type: bug
Platform: android 4.4 webview
when switching between tabs ONLY on Android platform, the app show a white flash. This is in 1.0.0 stable. Not using crosswalk. Forum post http://forum.ionicframework.com/t/white-flash-appearing-when-switching-between-tabs-on-android-in-1-0-0-stable/24774
WIP: virtual scroll
@robdmoore if you wanna test, here it is so far
Test in /test/html/list-fit.html
TODO:
issue(forms): Input, scrolling, keyboard issues for forms
Right now, the way Ionic handles form input can be better. Ionic 1 had awesome defaults for form inputs with regards to keyboard handling, content scrolling, etc. Ionic 2 needs to be made consistent, and more importantly, work properly for form inputs consistently across all platforms (iOS, Android, Windows).
See this repo for the code example which should be run on devices: https://github.com/dylanvdmerwe/ionic2-formtest
Android:
iOS:
Note that this issue has nothing to do with forms or inputs in a slidescomponent. That would be a seperate consistency check to perform.
Which Ionic Version? 2.x
Run
ionic info
from terminal/cmd prompt: (paste output below) Cordova CLI: 6.1.1 Ionic Framework Version: 2.0.0-beta.4-201604170622 Ionic CLI Version: 2.0.0-beta.24 Ionic App Lib Version: 2.0.0-beta.14 OS: Node Version: v5.7.0bug: infdig Infinite $digest Loop
Type: bug
Platform: ios 9 webview
I tried my app on iOS9 Beta and always receive this error, when i click something (e.g. a tab):
angularjs exception: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations: [] caused by "undefined js stack:
bug: Keyboard pushes the whole screen up
Type: bug
Ionic Version: 2.x
Platform: ios 9 webview
My code has a
<ion-toolbar position="bottom">
with a text input inside of it. When I try to type something in there on iOS the whole page gets pushed upwards by the keyboard.Ionic2 - nav.setRoot(Component) - Works only first time, unable to navigate after, no errors reported
Short description of the problem:
I am developing an app with Ionic2. I have App.ts as the parent, Welcome.ts as a child page and Featured.ts as a child page as well. I have firebase integrated with the app. Rootpage is first set to Welcome.
Step 1: I click a button on Welcome to authenicate with Google, once onAuth is called, I set
this.nav.setRoot(Featured);
All works fine up to now. I get to the Featured page which enables a sidemenu with different pages and i am able to navigate to all of them no problem.Step 2: Featured enables a sidemenu from App.ts/html, in there I have a logout button that calls unauth. Unauth does some Firebase unauth and then:
Step 3: Login again same as in step 1. All is fine up to now.
Step 4: Open side menu, selects any of the pages from the sidemenu, navigation doesn't occur. sidemenu closes but page remain the same, navbar icon button disappear and no navigation occurs. openPage code:
What behavior are you expecting?
I am expecting navigation to continue to occur, similar to what happens in step 1.
Steps to reproduce: Steps to reproduce included above.
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc) No error is being thrown unfortunately. I don't see any erros in the console logs.
Which Ionic Version? 2.x
Run
ionic info
from terminal/cmd prompt: (paste output below)Thank you.
Keyboard Issues
Ionic version: (check one with "x") [ ] 1.x [x] 2.x [x] 3.x
I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
Keyboards and input scrolling have long been a challenge for Ionic apps, even going all the way back to Ionic V1. We have recently put a focus on trying to knock out these keyboard issues. The issues we currently think are the highest priority when it comes to keyboards and inputs are the following:
We are currently working on a two-pronged approach of modifying the logic in the framework that handles this stuff (mainly for Android) along with some modifications to the WKWebView plugin to fix these issues for iOS. We are at a point now where we have a branch of the WKWebView plugin that has the fixes for iOS and are ready for our community to start testing this and providing feedback. We have made a Google doc here that has instructions on how this can be tested. We would love to have feedback on these fixes! Feel free to provide feedback as a comment to this issue. Thanks for using Ionic everyone!
Ionic 2 storage doesn’t have query method
I'm updating my app to Ionic 2 rc0 and using import {Storage} from "@ionic/storage"; But it doesn't have query method. It was there in beta 11 to query SQLite. How to query SQLite in rc0?
Memory leak in state change
It appears that changing state increases memory usage with every transition. Here's a simple example. Open your browser's memory profiler and click "Get Clicky".
http://codepen.io/perrygovier/pen/FJgBa
Pages with more stuff on it tend to increase the amount of memory that gets eaten with each transition. Note the number of nodes and listeners never decreases.
On my app that uses a few larger lists, the app can quickly get to 200mb after just a few mins of manual clicking back and forth. I have yet to crash the app due to memory pressure, but it seems more a matter of impatience than something that wouldn't happen with continued use.
I believe this is less an issue with Ionic and more to do with Angular's UI Router, but I thought I'd start here as it's where it popped up for me.
BountySource discussion that appears related
fix(picker-column-internal): blurring picker does not throw error
Pull request checklist
Please check if your PR fulfills the following requirements:
ionic-docs
repo, in a separate PR. See the contributing guide for details.npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
Blurring the picker quickly in certain browsers, such as Firefox, can result in an error being thrown in the console:
Issue URL: #26559
What is the new behavior?
elementFromPoint
to include the potentialnull
stateDoes this introduce a breaking change?
Other information
bug: Datetime throws error when blurring picker quickly
Prerequisites
Ionic Framework Version
Current Behavior
When changing the time of the datetime, and quickly clicking outside (blur), it gives an error. It can be seen in the Firefox console.
Uncaught TypeError: activeElement is null
Expected Behavior
expected no error
Steps to Reproduce
In the ionic example itself you can see:
https://ionicframework.com/docs/api/datetime#basic-usage
Code Reproduction URL
No response
Ionic Info
Ionic:
Ionic CLI : 6.20.6 Ionic Framework : @ionic/angular 6.4.1 @angular-devkit/build-angular : 15.0.4 @angular-devkit/schematics : 15.0.4 @angular/cli : 15.0.4 @ionic/angular-toolkit : 7.0.0
Capacitor:
Capacitor CLI : 4.6.1 @capacitor/android : 4.6.1 @capacitor/core : 4.6.1 @capacitor/ios : not installed
Utility:
cordova-res : 0.15.4 native-run : 1.7.1
System:
NodeJS : v18.12.1 npm : 9.2.0 OS : Windows 10
Additional Information
No response
chore(jsdoc): change JSDoc on RadioGroup to double slash (//) comment
This converts a multiline comment (like
/**...*/
) above theRadioGroup
component class to be a series of//
comments instead. This is done to prevent the comment from being accidentally recognized as a JSDoc comment for the class when a Stencil version incorporating this change is installed: https://github.com/ionic-team/stencil/commit/2e4b1fcdc0b3fd41928d27cf9ee525a15b02d617Pull request checklist
Please check if your PR fulfills the following requirements:
ionic-docs
repo, in a separate PR. See the contributing guide for details.npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
If you build and install Stencil from
main
you'll see a change like this incomponents.d.ts
:This is no good! The comment:
https://github.com/ionic-team/ionic-framework/blob/a1580d89e2083ac94569db598e062d07f9083321/core/src/components/radio-group/radio-group.tsx#L7-L20
wasn't intended to be included that way.
What is the new behavior?
This just changes the type of comment used in a comment immediately preceding a component class, to prevent the comment from being inadvertently used as a JSDoc comment.
Does this introduce a breaking change?
Other information
bug: broken Anchor-Link scrolling
Prerequisites
Ionic Framework Version
Current Behavior
I'm using anchor-links inside my html templates. These Links are using angulars router like this:
<a [routerLink]="['./']" [fragment]="'section-id'">go to section</a><section id="section-id">...</section>
My RouterModule configuration looks like this:
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules, anchorScrolling: 'enabled', onSameUrlNavigation: 'reload' })
When clicking on the anchor link nothing happens. There is no reaction at all. But when the anchor-link points on an focusable element (like button, input, etc) everything works as expected. Setting tabindex=0 on the section fixes the issue also, but this should not be necessary.
Expected Behavior
Anchor scrolling should always work, regardless of which element is the target. I tested this on a plain Angular project without Ionic and it was scrolling as expected (see reproduction section).
Steps to Reproduce
I prepared two repositories. One with an Ionic starter app including one single page with some content and two anchor links for testing. The second repository includes an plain angular starter app with the same test page. In the Angular project, you can see that it scrolls to the desired element at any time without having to set a tabindex there. In the Ionic project, only the anchor link that points to the section with tabindex=0 works.
It's enough to run the apps via 'ng serve' or 'ionic serve', go to localhost:4200 or localhost:8100 and reduce your browser-window height, so that the page is scrollable. Now click on the anchor-links at top of the page. The Code can be found here: https://github.com/Floscho2402/angular-working-anchor-links https://github.com/Floscho2402/ionic-broken-anchor-links
Code Reproduction URL
No response
Ionic Info
Ionic:
Ionic CLI : 6.18.1 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 6.4.1 @angular-devkit/build-angular : 15.0.4 @angular-devkit/schematics : 15.0.4 @angular/cli : 15.0.4 @ionic/angular-toolkit : 6.1.0
Capacitor:
Capacitor CLI : 3.5.1 @capacitor/android : not installed @capacitor/core : 3.5.1 @capacitor/ios : not installed
Utility:
cordova-res : not installed globally native-run : 1.7.1
System:
NodeJS : v16.13.0 (/usr/local/bin/node) npm : 8.1.0 OS : macOS Monterey
Additional Information
No response
bug: Unable to modify a page animation after a replace with Vue
Prerequisites
Ionic Framework Version
Current Behavior
When changing the page, with
ionRouter.replace
, my animation is not updated on its second call. If I make a custom animation during the replace, then I can't change the animation at the next replace.Expected Behavior
I would like to swipe left and trigger a page change to the left. Once the page has changed, I would like to drag to the right and trigger an animation to the right.
Steps to Reproduce
My animations :
My animation builder :
My gesture (call from
onIonViewWillEnter
):onMove event :
Code Reproduction URL
No response
Ionic Info
Additional Information
No response
bug: json5 <2.2.2 Severity: high tsconfig-paths 3.5.0 - 3.9.0 || 3.11.0 - 3.14.1
Prerequisites
Ionic Framework Version
Current Behavior
`# npm audit report
json5 <2.2.2 Severity: high Prototype Pollution in JSON5 via Parse Method - https://github.com/advisories/GHSA-9c47-m6qq-7p4h fix available via
npm audit fix
node_modules/tsconfig-paths/node_modules/json5 tsconfig-paths 3.5.0 - 3.9.0 || 3.11.0 - 3.14.1 Depends on vulnerable versions of json5 node_modules/tsconfig-paths2 high severity vulnerabilities
To address all issues, run: npm audit fix`
Expected Behavior
Getting this error one i create ionic project, or when I try to install a new package, and
npm audit fix
doesn't make any change.Steps to Reproduce
Getting this error one i create ionic project, or when I try to install a new package, and
npm audit fix
doesn't make any change.Code Reproduction URL
No response
Ionic Info
Ionic info :
Ionic CLI : 6.20.6 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 6.4.1 @angular-devkit/build-angular : 15.0.4 @angular-devkit/schematics : 15.0.4 @angular/cli : 15.0.4 @ionic/angular-toolkit : 6.1.0
Capacitor:
Capacitor CLI : 4.6.1 @capacitor/android : not installed @capacitor/core : 4.6.1 @capacitor/ios : not installed
Utility:
cordova-res : not installed globally native-run : 1.7.1
System:
NodeJS : v16.13.0 (/usr/local/bin/node) npm : 8.19.2 OS : macOS
Additional Information
No response