Questions tagged [ionic4]

Presentation

This tag is for questions specifically targetting version 4 of the Ionic Framework.

Ionic Framework is an open-source hybrid mobile application development framework that helps in building cross-platform mobile applications with standard Web technologies like , , and 's.

Ionic Framework is focused on giving a native-like UI experience, built on top of web technologies.

Traditionally, it has used Apache and . Since January 2019, Ionic 4 allows developers to choose multiple frameworks including , , , and web components.

Ionic also has a rich Command Line Interface which enables the developers to create, build, test and deploy applications.

Ionic 4 is built using which is a compiler that creates Web Components.

The Ionic Team are also developing an alternative to Cordova, called Capacitor. is a cross-platform app runtime that allows developers to build web apps that run natively on iOS, Android, Electron and the web.

Official Links:

5597 questions
13
votes
6 answers

Ionic 4 - Pass Data BACK from Popover without dismissing

In Ionic 4, I would like to pass data from Popover controller to the view page. I am able to get the data onDismiss() but I would like to do it without exiting the popover. Below is the code snippet I tried onDismiss() and it worked. Do we any other…
PKS
  • 131
  • 1
  • 1
  • 4
13
votes
7 answers

Close Modal in Ionic 4 by Back Button

I have a Modal in Ionic 4. I'd like to close it, when a user press the back button on her mobile (or the back button in her browser). Does anyone know how I can do this? EDIT: More details: I have a button that opens my modal: async onClick() { …
Markus
  • 1,222
  • 1
  • 13
  • 26
13
votes
3 answers

Dark Theme for Ionic 4

In Ionic 3 I could easily apply a dark theme to my app by adding just one line to my variables.scss: @import "ionic.theme.dark"; Is that still possible in Ionic 4 as simple as that? And if yes, how?
Markus
  • 1,222
  • 1
  • 13
  • 26
12
votes
6 answers

How to rename platform "App" in ionic with capacitor

How to rename platform application name from "App" to something else? When adding platform to ionic capacitor project by npx cap add ios it generates ios/App folder but I would like to name it ios/my-app. And if it is possible I would like to add…
user3714967
  • 1,575
  • 3
  • 14
  • 29
11
votes
2 answers

Migration Cordova to Capacitor - error: package android.support.v4.content does not exist

I'm trying to migrate my ionic app from cordova to capacitor. But I'm getting an error in Android build. android\capacitor-cordova-android-plugins\src\main\java\nl\xservices\plugins\FileProvider.java:4: error: package android.support.v4.content does…
dritan
  • 882
  • 2
  • 8
  • 22
11
votes
3 answers

How to prevent multiple clicks in Ionic 4 using debouncetime?

I am trying to avoid double clicks or double taps of button in ionic 4 as it should trigger action only on single click. If I double click, I want an action to be triggered once and not 2 times. I have tried several options such as disable button,…
Rajesh Kumar
  • 148
  • 1
  • 6
11
votes
4 answers

Ionic 4: Hardware Back Button Reloading Application

Working on a Project and stuck in an Issue: Hardware Back Button Reloading Application (I am using Angular Router in this application). My Code to Exit Application: ionViewDidEnter(){ this.subscription =…
Najam Us Saqib
  • 3,190
  • 1
  • 24
  • 43
11
votes
6 answers

Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):

I have created an application on angular 7 and ionic 4. I tried to edit app.routing.ts file, setting path and component. From then on I am getting this error below: ERROR in ./src/app/department/department.module.ts [ng] Module build failed (from…
user9885720
  • 131
  • 1
  • 2
  • 11
11
votes
3 answers

Ionic V4 - Build Prod "Could not find cordova.js script tag. Plugin loading may fail."

In Ionic v4, when I'm run app bundled in production mode (ionic cordova build android --prod), console says 'Could not find cordova.js script tag. Plugin loading may fail.' and some things of the app like fonts are unload(I see Roboto Font and not…
Septk
  • 111
  • 1
  • 6
11
votes
9 answers

-bash: ionic: command not found (Not able to install any version)

I am trying to install ionic globally. sudo npm install -g cordova ionic AND npm install ionic@3.2.0 --save I tried both the commend it execute successfully. But when i run ionic info it shows -bash: ionic: command not found Can anyone help…
Sunny Shah
  • 12,990
  • 9
  • 50
  • 86
11
votes
5 answers

ionic 4 + angular: routerLink only works first time

I'm having a weird bug while developing a basic app from scratch right now. I use Ionic 4 beta 19 and I've put a routerLink to another page, the route is set up in the base pages module like so: RouterModule.forChild([ { path: '', component:…
Yassine Zeriouh
  • 480
  • 3
  • 10
  • 23
11
votes
2 answers

How to disable swipe back gesture globally in ionic 4 angular project

Already tried to achieve this with: and in app.module: IonicModule.forRoot({ swipeBackEnabled: false }), config.xml:
Markus Kösel
  • 753
  • 1
  • 6
  • 17
11
votes
3 answers

Change Round css in IONIC 4

I have a button with shape round as follows: Signup with The class shadow-red is: .shadow-red{ box-shadow: 0px 14px 25px rgba(182, 30, 30, 0.59); border-radius:…
Programmer Man
  • 1,314
  • 1
  • 9
  • 29
11
votes
10 answers

How to detect platform using Ionic 4

How to detect browser and mobileweb platform using Ionic 4 because when I tried with below code in desktop browser it is not falling in ‘core’ condition. if (this.platform.is('core')) { alert('core platform'); } else { alert('something…
Darshana
  • 662
  • 1
  • 10
  • 29
10
votes
5 answers

Ionic 4 ionViewDidEnter() didnt triggered after navigated from ion-back-button

I'm having stuck with Ionic apps. My problem is I want to refresh the root page after navigated from the other page by clicking the ion-back-button, I'm trying to use the ionic lifecycle events. Anyone having issues with the ionViewDidEnter() too…
Snowbases
  • 2,316
  • 2
  • 20
  • 26