ionic4

How to change the background color of tab bar and tab icon in Ionic 4

谁说胖子不能爱 提交于 2019-12-11 06:56:22
问题 I want to know how to change the background color of this tab bar as Ionic 4. I tried to add the --background: white; in ion-tab/ion-tabs but it doesn't work. <ion-tabs> <ion-tab label="Home" icon="home" href="/tabs/(home:home)"> <ion-router-outlet name="home"></ion-router-outlet> </ion-tab> <ion-tab label="About" icon="information-circle" href="/tabs/(about:about)"> <ion-router-outlet name="about"></ion-router-outlet> </ion-tab> <ion-tab label="Contact" icon="contacts" href="/tabs/(contact

FAILURE: Build failed with an exception in ionic 4

杀马特。学长 韩版系。学妹 提交于 2019-12-11 05:39:11
问题 I have created an app called phone (ionic v-4). I have tried to implement Phone authentication i,e OTP verification using firebase by following this article in the medium. Now i tried to deploy my app(phone) in my android device, using below command. ionic cordova run android I am getting this error: But the app runs fine in the browser . I am unable to perceive the error . 回答1: Do try to remove and add again the Android platform ionic cordova platform rm android ionic cordova platform add

Opening keyboard in Ionic 4 Android app moves the background image up

邮差的信 提交于 2019-12-11 05:21:01
问题 I have tried two options in my AndroidManifest.xml android:windowSoftInputMode="adjustResize" and android:windowSoftInputMode="adjustPan" With adjust adjustResize it pushes up my background image so that it looks pretty rubbish. It also allows this weird white section if you scroll down. See the 2nd and 3rd image. If I use adjustPan it looks great and fixes the problem but on devices with lower resolution inputs are hidden by the keyboard and users can't get to them as scrolling is not

Ionic 4 - determing if there is a forward-navigation available

本小妞迷上赌 提交于 2019-12-11 04:32:23
问题 I am currently upgrading an Ionic 1 app to Ionic 4. I need to know, if the current page has a "forwardView" available. Meaning I need to know if the user visited the page by using a "normal" forward link, or by using the "ion-back-button" (respectively the browser back button) In Ionic 1 we used the feature "forwardView()": http://ionicn.com/docs/api/service/$ionicHistory/ The code looked something like this: class ListViewContentController { static $inject = [ '$ionicHistory', ] constructor

Ionic 4: 'ion-slide' is not a known element

回眸只為那壹抹淺笑 提交于 2019-12-11 04:14:55
问题 I am using ion-slides in a new component. carousel.component.html <ion-slides pager="true" > <ion-slide> <h1>Slide 1</h1> </ion-slide> <ion-slide> <h1>Slide 2</h1> </ion-slide> <ion-slide> <h1>Slide 3</h1> </ion-slide> </ion-slides> carousel.component.ts import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-carousel', templateUrl: './carousel.component.html', styleUrls: ['./carousel.component.scss'] }) export class CarouselComponent implements OnInit { constructor() {

Custom validation for email and confirmemail matching fields requirement

▼魔方 西西 提交于 2019-12-11 03:21:37
问题 Hi I have created a sample ionic4 registration form with fields like Email id, Confirm email id, password, confirm password. And added all the required validations with a password and confirm password mismatching error. But I am unable to do the same with Email id and confirm Email id. i.e email id and confirm email id mismatching error.below is my code. Html code: <ion-content> <form [formGroup]="addreceiver"> <div style="margin:15px"> <ion-item> <ion-label position="floating" >Sender Email

ion-content won't show when using Ionic core 4

爷,独闯天下 提交于 2019-12-11 01:52:31
问题 I'm developing an app that uses Vue.js and Ionic, but I can't figure it out why updating my Ionic core version breaks the ion-content tag, I tried googling if the tag was discontinued, but it doesn't seem to be the case. To illustrate, I've made a example that uses Ionic core. With the latest Ionic version the ion-content tag doesn't show up, but if you switch to the older Ionic version, then it shows just fine. <head> <meta charset="UTF-8"> <title>Ionic Test</title> <script src="https:/

how to give Alert Controller css in ionic 4?

你离开我真会死。 提交于 2019-12-11 00:49:19
问题 I want to give alert controller style in ionic 4.these is my demo code, async presentalert() { const alert = await this.alertCtrl.create({ header: ' DO YOU WANT TO CANCEL', message: 'DO YOU WANT TO CANCEL', cssClass: 'alertCancel', mode: 'ios', buttons: [ { text: 'NO', role: 'cancel', cssClass: 'alertButton', handler: () => { console.log('Confirm Cancel'); } }, { text: 'YES', cssClass: 'alertButton', handler: () => { console.log('Confirm Okay'); } } ] }) await alert.present(); } and i tried

Is there a way of not trigger checkbox when clicking in a ion-item Ionic 4?

隐身守侯 提交于 2019-12-10 23:38:13
问题 When I click on the label of an ion-item the checkbox is triggered. I want to find a way of preventing this from happening as I want to trigger another function when clicking the label. I found this answer for Ionic 3: https://forum.ionicframework.com/t/solved-can-i-disable-a-checkbox-from-activating-when-clicking-on-a-label/95120 However, it is not working for Ionic 4. <ion-item> <ion-icon [name]="setIconDoc(item.document.documentType)" color="primary" (click)="editDocument(item.document)"><

Change ion-input underline color in Ionic 4

拟墨画扇 提交于 2019-12-10 19:23:22
问题 How can we change the default underline color of a ion-text in only a single page in Ionic 4? 回答1: The underline is actually a part of the ion-item, not the ion-input. ion-item { --border-color: var(--ion-color-danger, #f1453d); } 回答2: For Ionic V4.X is a little bit diffrent. You can open specific_page.scss file where you want to change ion-input border when input value is Valid o Invalid Change the colors of the following class, like this: :host { .item-interactive.ion-invalid{ --highlight