ionic-framework

Firebase redirect user to a page after clicking verification link

折月煮酒 提交于 2020-06-08 08:06:12
问题 I'm using firebase in my web app with Ionic and I would like to redirect the user to a specific page (the login page, in my case) after he clicks on the link in the verification email. At the moment, when the user clicks on the verification link, he is redirected on another browser page that says that he has confirmed the email. I would like to redirect him directly to a page of my web app, without passing through that confirmation. Is it possible to do that? 回答1: Yes it's possible. Look in

Why white screen stuck after splash screen in Ionic 4?

时间秒杀一切 提交于 2020-06-08 07:16:13
问题 I run ionic cordova run android for my Ionic Cordova project. At this time, I have my mobile connected to PC via USB. So when I run that command, it installs the app on my real device Android Redmi Note 6 PRO. But what really happens is when the app opens, only white screen appears, nothing else at all. First it shows splash screen and then white screen forever. Why does this behaviour happen? I read somewhere that some people had this problem because of Ionic 4. Below are my logcat logs from

No 'Access-Control-Allow-Origin' header is present on the requested resource - ionic 2 application

蓝咒 提交于 2020-06-08 05:03:45
问题 I receive the following error when i try to access my local server with a POST request: XMLHttpRequest cannot load http://127.0.0.1:8000/api/v1/users/login. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access. My server allows CORS because I've tested it by sending the request with postman and it works. Here is my code in the front-end: private headers = new Headers({ 'Access-Control-Allow-Origin': '*',

How to convert JSON Strings to arrays in Javascript ionic?

浪尽此生 提交于 2020-06-01 07:40:30
问题 Suppose i have this json string data returned from an API URL which is already in JSON: [{ "images":"[\"A.jpg\",\"B.jpg\",\"C.jpg\"]" }] In my html page when i wanted to call the image, i wrote it like this: <ion-card-header *ngFor="let data of datauser"> <img src="https://example.com/images/{{data.images}}"> </ion-card-header> But it displays as an empty image with this src in the console: "https://example.com/images/["A.jpg","B","C.jpg"]" & when i access the first image like this: <ion-card

Show a ion-menu in ionic3 without routing and without gestures

左心房为你撑大大i 提交于 2020-06-01 05:14:27
问题 I'm trying to implement a side menu like the one shown in the ion-menu component page. I just want to show the side menu programmatically, I don't mean to trigger navigation from it or have a burger button in the top bar. I use neither ion-router-outlet nor any other routing systems. I tried copying and pasting the example on the page, but what I get is an error in console: menu.js:292 Menu: must have a [content] element to listen for drag events on. Example: <ion-menu [content]="content">

ionic 2: Display array of items in a 3x3 table

萝らか妹 提交于 2020-05-30 10:11:08
问题 I have an array of items I would like to display in a 3x3 table like display as follows: In order to achieve that, I sliced my array into 3 arrays of 3 and displayed it as follows: <ion-grid no-padding class="home-gallery"> <ion-row *ngFor="let row of items | async"> <ion-col *ngFor="let item of row"> <div class="products_list"> <div class="products_list_img"> <img [src]="item.previewImage" (click)="showItem($event, item)"/> </div> </div> </ion-col> </ion-row> </ion-grid> Is there a way to

Ionic 4 cannot import custom component is not a know element

送分小仙女□ 提交于 2020-05-29 11:24:48
问题 I am new to Ionic and I want to create a custom listview with expandable items following this link : https://www.joshmorony.com/creating-an-accordion-list-in-ionic/. The problem is that my custom component is never recognized, I have tried many things but nothing works... I am using Ionic 4 and they do not talk of component generation in their doc. The error is : Error: Template parse errors: 'expandable' is not a known element: 1. If 'expandable' is an Angular component, then verify that it

Missing provider for Ionic's Network native plugin

 ̄綄美尐妖づ 提交于 2020-05-28 03:18:08
问题 I've tried using Ionics native plugin "Network" but it fails because of a supposedly missing provider. In order to avoid any mistakes I've installed a fresh installation of Ionic and the required dependencies: ionic cordova plugin add cordova-plugin-network-information npm install @ionic-native/network Then I've added the dependency to home's constructor: import { Component } from '@angular/core'; import { Network } from '@ionic-native/network/ngx'; @Component({ selector: 'app-home',

ionic capacitor qrscanner activity compat

浪尽此生 提交于 2020-05-27 12:37:30
问题 I'm creating an ionic capacitor application. In my app I have to use QR Scanner so I used https://ionicframework.com/docs/native/qr-scanner plugin to integrate qr scanner. Then I do ionic capacitor copy android and ionic capacitor open android . Then in android studio when I try to build it throws capacitor-cordova-android-plugins/src/main/java/com/bitpay/cordova/qrscanner/QRScanner.java -cannot find symbol class ActivityCompat -cannot find symbol variable ActivityCompat Ionic version is 6.4

My Hardware 'Back Button Action' is not working in Ionic 4

我怕爱的太早我们不能终老 提交于 2020-05-25 16:02:56
问题 I am working in my Ionic 4 app and When the user clicks 2 times on the mobile back button, then it should close the app but this is not happening. This is my app.component.ts : lastTimeBackPress = 0; timePeriodToExit = 2000; @ViewChildren(IonRouterOutlet) routerOutlets: QueryList<IonRouterOutlet>; constructor(){ this.backButtonEvent(); } backButtonEvent() { document.addEventListener("backbutton", () => { this.routerOutlets.forEach((outlet: IonRouterOutlet) => { if (outlet && outlet.canGoBack(