ionic4

How do I change Ionic 4's ion-range pin font and formatting?

孤者浪人 提交于 2020-02-28 08:05:02
问题 As an example, I tried this in my global.scss file: .range-pin { color: white; font-family: sans-serif; &after:{ content: " %"; } } But this has no effect. I'm sure this has something to do with shadow root but I'm not sure what the right thing to do is here. Adding ion-range .range-pin to be more specific doesn't help either. How do I achieve this change? 回答1: You are correct that the ion-range pin is part of the shadow dom, therefore we must use the SCSS variables that Ionic provides to

Getting count of contacts correct but getting null values for contacts in Ionic 4

戏子无情 提交于 2020-02-23 08:07:25
问题 I am using ionic contacts plugin it is giving me the correct number of contacts in the phone but all the details field are null, I am using, “cordova-plugin-contacts”: “3.0.1”, “@ionic-native/contacts”: “^5.0.0” import { Contacts } from '@ionic-native/contacts/ngx'; constructor( private contactsPlugin: Contacts ) { } document.addEventListener("deviceready", () => { this.contactsPlugin.find(["displayName", "phoneNumbers","photos"], {multiple: true, hasPhoneNumber: true}) .then((contacts) => {

Keycloak for ionic app : keycloak-js with cordova-native does not work

こ雲淡風輕ζ 提交于 2020-02-23 05:43:17
问题 I am trying to use the Keycloak-js(from 4.4.0.Final) library in my ionic(4) cordova application. I have followed the example and instructions from the documentation. I have installed cordova-plugin-browsertab , cordova-plugin-deeplinks , cordova-plugin-inappbrowser . Added <preference name="AndroidLaunchMode" value="singleTask" /> in my config.xml And this is how my modifications to config.xml looks like. <widget id="org.phidatalab.radar_armt"....> <plugin name="cordova-plugin-browsertab"

How to check for time sync in Ionic 4 app to prevent time cheat/fake by user?

那年仲夏 提交于 2020-02-08 10:16:12
问题 I am developing an App in Ionic 4 using Angular and I am using Firebase to store and retrieve data using AngularFire. My App displays list of events from database that span over two days from current time and has an option for registering for events. Events that had start time in past and start time in future(3+ days from now) are not shown in the App. Currently, I am using client's system time but the problem with this is user can change device time to past to see all the events in the past

Error: Cannot match any routes. URL Segment: 'null' in Ionic Angular App

佐手、 提交于 2020-02-07 05:24:06
问题 I am developing an application using Ionic 4 with Angular and I am getting following error: VM1190 vendor.js:51847 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'null' Error: Cannot match any routes. URL Segment: 'null' at ApplyRedirects.push../node_modules/@angular/router/fesm5/router.js.ApplyRedirects.noMatchError (router.js:2469) at CatchSubscriber.selector (router.js:2450) at CatchSubscriber.push../node_modules/rxjs/_esm5/internal/operators/catchError.js

How can I have conditional ion-back-button text based on if the defaultHref is used?

柔情痞子 提交于 2020-02-06 18:06:31
问题 I have a button that I want to display text but only when the defaultHref is used. Is there a way to detect that? <ion-back-button *ngIf="defaultHref" [defaultHref]="defaultHref" [text]="text" icon="ios-arrow-back" mode="md"></ion-back-button> If the back button shows as a result of a different router forward, the back button link goes somewhere else but the text I set is still there. Is there a way to make that text conditional upon the link matching the defaultHref that I set? 回答1: From

How can I have conditional ion-back-button text based on if the defaultHref is used?

我与影子孤独终老i 提交于 2020-02-06 18:04:58
问题 I have a button that I want to display text but only when the defaultHref is used. Is there a way to detect that? <ion-back-button *ngIf="defaultHref" [defaultHref]="defaultHref" [text]="text" icon="ios-arrow-back" mode="md"></ion-back-button> If the back button shows as a result of a different router forward, the back button link goes somewhere else but the text I set is still there. Is there a way to make that text conditional upon the link matching the defaultHref that I set? 回答1: From

Ionic calendar event does not load on device

好久不见. 提交于 2020-02-06 12:50:41
问题 I am doing a calendar event application and it runs perfect in a browser but when I build it on a device the date format is different and it is showing me errors. I have used ionic2-calendar for this and the error is happening only on a real device it runs perfectly on a browser. I have tried everything but I can't solve this problem. This is my home.page.ts import { CalendarComponent } from 'ionic2-calendar/calendar'; import { Component, ViewChild, OnInit, Inject, LOCALE_ID } from '@angular

Send image from ionic to asp.net core web api

倖福魔咒の 提交于 2020-02-06 06:39:46
问题 We are looking to upload image from ionic to .net core web api. To achieve this we are using file transfer plugin. So, far we understood that image will be converted into base64. However, what we are looking is how can we sent form data along with multiple image to web api? Below is the code from ionic side. HTML code to trigger select image function: <ion-button fill="clear" expand="full" color="light" (click)="selectImage()"> <ion-icon slot="start" name="camera"></ion-icon> Select Image<

Ionic File Upload using HTML5 input

╄→尐↘猪︶ㄣ 提交于 2020-02-04 22:17:12
问题 I am using ionic to build a mobile app that incorporates a file upload. Versions ionic (Ionic CLI) : 4.10.3 Ionic Framework : ionic-angular 3.9.3 @ionic/app-scripts : 3.2.3 The files supported are images word documents (.doc, .docx) pdf I am trying to use a HTML input tag with the attribute of type="file" <input style="display:none;" type="file" accept="image/*, .pdf, .doc, .docx" (change)="fileSelected($event)" #chosenFile /> <button class="btnAttach" (click)="chosenFile.click()"><ion-icon