ionic-framework

Ionic4: How to open external link from Side Menu

不羁的心 提交于 2020-04-30 19:35:58
问题 On my ionic project, I have created side menu at app.html to be available through the whole app, this menu contains items with links that should be opened externally. I have tried to open them with InAppBrowser but I have this error pups up: uncaught (in promise) invalid views to insert app.html: <ion-list no-margin> <ion-item menuClose ion-item no-lines *ngFor="let l of SocialLinks" (click)="openPage(l.Url)"> <ion-icon name="{{l.icon}}"></ion-icon> </ion-item> </ion-list> app.component.ts:

Error with query from Firebase in the .where statement

 ̄綄美尐妖づ 提交于 2020-04-30 07:11:47
问题 I have this function, but I´m having this error with the "where" statement. getUser() { this.db.collection("users").where("name", "==", "Maria") } ERROR: Property 'where' does not exist on type 'AngularFirestoreCollection'.ts(2339) 回答1: If you want to apply querying in firebase collection. You have to pass queryFn as a second argument to collection method. Try this: this.db.collection("users",(ref) => { let query : firebase.firestore.CollectionReference | firebase.firestore.Query = ref; query

Ionic4 Unknown browser query

南笙酒味 提交于 2020-04-30 05:20:20
问题 I have practised Ionic a lot so these Problems are not new for me but I am unabale to solve this one. I am currently trying to migrate my Ionic3 project to Ionic4. To do this I have created a new Ionic4 tabs project. Every time I try the Ionic serve command I am getting: [ng] An unhandled exception occurred: Unknown browser query basedir=$(dirname "$(echo "$0" | sed -e 's Maybe you are using old Browserslist or made typo in query. [ng] See "C:\Users\Admin\AppData\Local\Temp\ng-9er5Id\angular

Ionic 2 cordova InAppBrowser browser.close() is not a function

我与影子孤独终老i 提交于 2020-04-30 04:44:22
问题 I am integrating a payment gateway in my ionic app in which i am using node js on the server side. On a click of button i am redirecting user to the payment gateway page using ionic native inAppBrowser after which i am listening to url events. When the payment is successful then the browser will redirect to success url else it will redirect to failed url. Based on this i am handling the UI in the app. My problem is when i listen to the success/failed url and call the close browser event i get

ionic 4 change ion label color when focused within ion item

夙愿已清 提交于 2020-04-18 12:35:55
问题 I want to change ion-label color inside an ion-item with ion-input when focused. I am able to change the highlight color of ion-item using --highlight-color-focused: yellow; but unable to change the label color. It is showing default color of label as primary but I want to change it as 'warning' or if required any custom color. I've tried the following solution which is mentioned in Ionic github repository for same problem but didn't get my problem solved. https://github.com/ionic-team/ionic

ionic 4 change ion label color when focused within ion item

故事扮演 提交于 2020-04-18 12:35:20
问题 I want to change ion-label color inside an ion-item with ion-input when focused. I am able to change the highlight color of ion-item using --highlight-color-focused: yellow; but unable to change the label color. It is showing default color of label as primary but I want to change it as 'warning' or if required any custom color. I've tried the following solution which is mentioned in Ionic github repository for same problem but didn't get my problem solved. https://github.com/ionic-team/ionic

How to display base64 image on iPhone in Ionic 4

三世轮回 提交于 2020-04-18 06:12:15
问题 I am using Capacitor Plugins to get the image file (from camera or gallery). PC and Android are working fine, but the code crashes on iPhone. It opens the galery, I grab the image and it crashes when trying to display I checked the permissions and they are all set. Why would it crash only on ios? Is it a problem with the string? Security? HTML: < ion-img role="button" class="image" [src]="selectedImage" *ngIf="selectedImage" > TS CODE: Plugins.Camera.getPhoto({ quality: 100, source:

Ionic / Cordova Windows build picking up incorrect MSBUILD path

纵饮孤独 提交于 2020-04-18 05:53:05
问题 I Have had to do a few update of Visual Studio on my Windows 10 machine (after some licensing issues) I use to have Visual Studio Enterprise 2017, which I uninstalled. I now have Visual Studio Professional 2017, and Studio Enterprise 2019 (which I recently installed).I also installed Visual Studio Build Tools 2019 (2) Now, when I try to build my Ionic project via the command I have always used... ionic cordova build windows --prod --release -- --archs="x86 x64 arm" --buildConfig=platform

Secured connection between app and server

◇◆丶佛笑我妖孽 提交于 2020-04-18 03:55:55
问题 I try these code to connect my ionic app to apiserver (get) import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class EncryptionService { url = 'https://api.am....com'; api-key='......' constructor(private http: HttpClient) { } newcheck(checkid: string ,cost: string,toname: string,tocode: string,passcode: string,date: string,checkfor:

Secured connection between app and server

[亡魂溺海] 提交于 2020-04-18 03:55:13
问题 I try these code to connect my ionic app to apiserver (get) import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class EncryptionService { url = 'https://api.am....com'; api-key='......' constructor(private http: HttpClient) { } newcheck(checkid: string ,cost: string,toname: string,tocode: string,passcode: string,date: string,checkfor: