ionic5

My release apk crash immediately but the debug app work properly ionic 5

馋奶兔 提交于 2021-02-11 14:54:22
问题 I have installed ionic 5 and made project, it works fine on emulator, and debug on real devices properly working, but when I build release ionic build : ionic cordova build android --release --prod it shows: Add only entry points to the 'files' or 'include' properties in your tsconfig. cordova build android --release Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=/Users/wiqqi/Library/Android/sdk (DEPRECATED) Using Android SDK: /Users

JSBarcode integration with Ionic 5

我是研究僧i 提交于 2021-02-11 12:50:35
问题 i am integrating JSbarcode with ionic 5. I am using @ViewChild for barcode element in html. but the issue is that i will get undefined for viewchild because viewchild is accessed before view is completely loaded in html. i tried with ngafterviewinit, but still it didn't work. Only thing worked for me was setTimeout as shown below. getBarcode(){ setTimeout(()=>{ this.generateBarcode(this.barcode); },2000) } But setTimeout differs in speed across various devices hence in few devices barcode was

Ionic 5 menu doesn't show up

耗尽温柔 提交于 2021-01-28 18:01:53
问题 I have a demo application where I want to insert a menu. Unfortunately I can't get this menu to appear in the header. I've tried different approaches, but I can't find the solution. My app.component.html looks like this: <ion-app> <app-header></app-header> <ion-router-outlet id="main-content"></ion-router-outlet> <app-footer></app-footer> </ion-app> My header.component.html like this: <ion-menu side="start" contentId="main-content"> <ion-header> <ion-toolbar color="primary"> <ion-buttons slot

Custom Icons with Ionic 5?

走远了吗. 提交于 2021-01-21 06:47:09
问题 I recently updated from Ionic 4 to Ionic 5. With Ionic 5 the icons received an update too. Apparently however also the mechanism loading the icons changed. In Ionic 4 it was possible to add custom icons like this: https://medium.com/@JordanBenge/how-to-create-custom-ionic-4-icons-af80cc6cc148 Add e.g. ios-my-custom-icon.svg and md-my-custom-icon.svg in an icon folder in the assets . Then it was necessary to reference them in the angular.json like: ... "assets": [ ... { "glob": "**/*.svg",

Custom Icons with Ionic 5?

血红的双手。 提交于 2021-01-21 06:46:46
问题 I recently updated from Ionic 4 to Ionic 5. With Ionic 5 the icons received an update too. Apparently however also the mechanism loading the icons changed. In Ionic 4 it was possible to add custom icons like this: https://medium.com/@JordanBenge/how-to-create-custom-ionic-4-icons-af80cc6cc148 Add e.g. ios-my-custom-icon.svg and md-my-custom-icon.svg in an icon folder in the assets . Then it was necessary to reference them in the angular.json like: ... "assets": [ ... { "glob": "**/*.svg",

Ionic 5/Capacitor ERR_CLEARTEXT_NOT_PERMITTED in Android

点点圈 提交于 2021-01-15 19:46:53
问题 I'm using Capacitor for building the Ionic app. These are the following commands run in order to open the android app in Android Studio. npx cap add android ionic build npx cap copy npx cap open android In Android Studio, I ran the build and click on Run after which I see the error net::ERR_CLEARTEXT_NOT_PERMITTED in my device. I have seen various posts having the same error but those are with Cordova build. In my case, I'm not using Cordova for preparing the android app. Here are few

Ionic 5/Capacitor ERR_CLEARTEXT_NOT_PERMITTED in Android

青春壹個敷衍的年華 提交于 2021-01-15 19:43:06
问题 I'm using Capacitor for building the Ionic app. These are the following commands run in order to open the android app in Android Studio. npx cap add android ionic build npx cap copy npx cap open android In Android Studio, I ran the build and click on Run after which I see the error net::ERR_CLEARTEXT_NOT_PERMITTED in my device. I have seen various posts having the same error but those are with Cordova build. In my case, I'm not using Cordova for preparing the android app. Here are few

React Ionic 5: How to pass object from App component to Tab component

巧了我就是萌 提交于 2020-12-12 18:07:54
问题 I have created an Ionic React app using Ionic 5 tab template. I want to pass an object from App component to tab component. Is there any way to do it ? Tab1 and Tab2 are my tab components. Note: I want this object to be used in both Tab components with two way data binding i.e. whenever that object is changed in one Tab component, it must be updated in second Tab component.I want to achieve it without using Redux or any third party library. My App component is like below: <IonApp>

Searching alternative for events in ionic 5 [closed]

大兔子大兔子 提交于 2020-12-12 12:01:06
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 22 days ago . Improve this question Ionic 4 Components: import {Events} from '@ionic/angular'; constructor(private auth: AuthService, private events: Events) {} intercept(req: HttpRequest<any>, next: HttpHandler) { // Refresh token failed, logout user this.events.publish('user:logout', 'La sesión ha expirado');

How to put image in both <ion-header> and <ion-content> in Ionic

女生的网名这么多〃 提交于 2020-12-12 05:11:20
问题 I'm currently developing Ionic app and stuck at implementing image in both ion-header and ion-content. Here's screenshot how I implemented. As you can see from screenshot, ion header and ion-content contents are hidden because I set image z-index to high number; Could anyone please suggest how to achieve this? Thanks. 回答1: There's an easier way to do that, and it's by using the fullscreen property from the ion-content component (docs). So the trick is to make the content to be fullscreen and