Questions tagged [ionic2]

Ionic 2 is the next generation of Ionic, the open source SDK that enables developers to build performant, high-quality mobile apps using familiar web technologies (HTML, CSS, and JavaScript). Ionic 2 is usually paired with Angular (2). Ionic 2 can also be used as a CSS framework but you'll miss out on the powerful gestures, UI animations and more useful things.

What is Ionic 2?

Ionic 3 was released on 7 April 2017 to overtake Ionic 2.

Ionic 2 was the next generation of Ionic's initial release, the open source SDK that enabled developers to build performant, high-quality mobile apps using familiar web technologies (HTML, CSS, and JavaScript).

Ionic 2 was usually paired with Angular (2). Ionic 2 could also be used as a CSS framework but that would void the powerful gestures and UI animations made to mimic native mobile interaction.


How to install and setup a project

Installing Ionic 2 can be done using npm and the ionic cli.

To install Ionic 2 run $ npm install -g ionic cordova. This will immediately install the ionic cli so all your ionic commands are ready to be used.

To setup a project with different :

  • tabs: $ ionic start myApp tabs
  • sidemenu: $ ionic start myApp sidemenu
  • blank: $ ionic start myApp blank

Where tabs will create an application where 4 tabs (positioned at the bottom of the screen are generated), sidemenu will generate a project with a sidemenu (also showing good use of NavController utilities) and blank will generate a project with just a single page.


Maturity/Version

Ionic 2's current version is 3.12.0. The first release of the final version. (as of 8 March, 2017).

how to install the latest version

If you want to create a new project with 3.12.0: $ npm install -g ionic

If you want to update an existing project to 3.12.0:

Update your package.json to match the following dependencies, remove the existing node_modules directory, and then run npm install:

  "dependencies": {
    "@angular/common": "2.4.8",
    "@angular/compiler": "2.4.8",
    "@angular/compiler-cli": "2.4.8",
    "@angular/core": "2.4.8",
    "@angular/forms": "2.4.8",
    "@angular/http": "2.4.8",
    "@angular/platform-browser": "2.4.8",
    "@angular/platform-browser-dynamic": "2.4.8",
    "@angular/platform-server": "2.4.8",
    "@ionic/storage": "2.0.0",
    "ionic-angular": "2.2.0",
    "ionic-native": "2.4.1",
    "ionicons": "3.0.0",
    "rxjs": "5.0.1",
    "sw-toolbox": "3.4.0",
    "zone.js": "0.7.2"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.1.4",
    "typescript": "2.0.9"
  }

Read more at 1


Useful Ionic 2 links

And of course the active community of Stack Overflow.

12143 questions
3
votes
1 answer

Make an ion-textarea scrollable when height is exceeding max-height

I am trying to implement a chat in my app. I wrote an autosizing ion-textarea as follows: View
Manuel RODRIGUEZ
  • 2,131
  • 3
  • 25
  • 53
3
votes
0 answers

Network provided date and time (Ionic 2)

I am developing an android app in ionic 2, is there a way I can determine if the time that I am getting is network provided or if the time was set manually. Thanks!
3
votes
0 answers

How to show my ionic 2 app as an option to open a vcf file using intent-filter

I want my ionic 2 app to be able to show up as an option to open vcf file. Whenever user clicks on a .vcf file in android, usually default contact application launches but I want to launch my ionic 2 app. I also need to read content of vcf file from…
Dijish U.K
  • 159
  • 1
  • 22
3
votes
2 answers

Is there a way that I can synchronize MySQL server and SQlite in Ionic 2?

I want to synchronize MySQL server database to a local sqlite database in ionic 2 in order to enable users store information offline then call/send changes when online. I have seen a few ways to make it work in android but i haven't found much…
Kissa Eric
  • 77
  • 1
  • 11
3
votes
1 answer

How to get the names of tables of my firebase database in ionic 2

Is there any solution that allow me to get the name of tables of my database as shown in the picture
Ali H
  • 903
  • 14
  • 36
3
votes
3 answers

ionic2 - angularfire2 - firestore: Missing or insufficient permissions on logout

i'm stuck on this issue working on a ionic2 project with "firestore" service from firebase. I have an osservable to get some data from firestore in a template using the async pipe. Rule on this EndPoint give read and write access only to logged…
mrjungle
  • 31
  • 4
3
votes
0 answers

Ionic Firebase push notification icon is not visible on all devices

I have an Ionic app (v 2.0.2) consisting Firebase Push notification. I am having some issues. Stating them here. I am getting the Notification Icon to appear on Xiaomi device but can not get it to show on Samsung. I have used following php…
3
votes
1 answer

How can I change tab and go to root of a navigation stack?

I'm using Ionic 2 and have a set of tabs. Each tab maintains its own navigation stack. The user is able to go several pages deep into any of the tabs and then switch tab. The problem is that there are interactions in tab 1 that effect the content…
Mike
  • 8,767
  • 8
  • 49
  • 103
3
votes
0 answers

Handling back button in Ionic 3 with tabs

This question and its answers (copied below) provide a solution for handling the back button in Ionic, but that solution only works when other pages are pushed directly from app.component, in which case calling canGoBack and getActive() on this.nav…
Ari
  • 7,251
  • 11
  • 40
  • 70
3
votes
0 answers

ionic app automation with appium - release choice instead of xpath

Typically when we work with selenium automation of a website, we go with say an element id, which is intuitive, human readable and via a process can be locked down to be shared between developers and automation engineers. Our current assignment is…
James
  • 109
  • 1
  • 4
3
votes
0 answers

upload files by using FILE-URI distination to firebase storage in Ionic 2

Is possible to upload files such as images, txt, pdf on firebase storage by using FILE-URI distination (local path) ? For example, How can I edit this uploading images function to upload files by using local path , and is possible to upload other…
Ali H
  • 903
  • 14
  • 36
3
votes
4 answers

Ionic 2 - Geolocation timeout error

I want to detect latitude and longitude everytime when I click on button. I have tried to search on many sites and blogs but not getting any specific solution. I have also installed cordova-plugin-geolocation and used like this: import { Component }…
Aparna
  • 103
  • 2
  • 11
3
votes
0 answers

tabs in verticaly middle page or after div element in ionic 2

I want to implement tabs in the middle of page or after div in ionic 2. I have tried top and bottom.it successfully set to bottom or top but i want to set it after div. Can anyone done like this before? in ts file: tab1Root = tabPage1; tab2Root =…
3
votes
1 answer

Navigation stack needs at least one root page

When I call this.navCtrl.popAll();, I get this error: Error: Uncaught (in promise): navigation stack needs at least one root page But the root page is set in app.component.ts: rootPage = LandingPage; What is still missing?
Display Name
  • 4,502
  • 2
  • 47
  • 63
3
votes
3 answers

how can I show two ion-col field inside ion-item section in IONIC 3

I need to show two input field inside a row look like: But when I use : Phone Number
Neotrixs
  • 2,495
  • 4
  • 28
  • 58
1 2 3
99
100