Category: Ionic

Keyboard.hide() doesn’t work in capacitor / ionic 6 project

Query asked by user I have a simple form that the user can enter a value and those two values are added together. This is my form code: <form (ngSubmit)=”calculateTwo(value1, value2)”> <ion-grid> <ion-row> <ion-col> <ion-item> <ion-input name=”value1″ type=”number” [(ngModel)]=”value1″ (keyup.enter)=”calculateTwo(value1, value2)”> </ion-input> </ion-item> </ion-col> </ion-row> <ion-row> <ion-col> <ion-item> <ion-input name=”value2″ type=”number” [(ngModel)]=”value2″ (keyup.enter)=”calculateTwo(value1, value2)”></ion-input> </ion-item> […]

How to return a promise with alertcontroller in ionic 4?

Query asked by user I am trying to convert this ionic 3 code into ionic 4 but I don’t know how the promise works on ionic 4. I tried looking into the documentations and I can’t find any solutions to promises async generateAlert(header, message, ok, notOk): Promise<boolean> { return new Promise((resolve, reject) => { let […]

Ngx-translation not working across different modules in ionic

Query asked by user I want to make my ionic app to support multiple languages. I have created one service called translate-config.service.ts where I am getting and setting language as per user preference and storing selected language in local storage. below is my service import { Injectable } from ‘@angular/core’; import { TranslateService } from […]

How to set minimum and max times in an ion-datetime

Query asked by user I am using an ionic DateTime component to pick just time in my page. But I have to just allow the user to select times from 06:30 Am to 07:30 PM. How can I limit the min-max times in ion-datetime I have already tried giving min value to the component directly. […]

Execution failed for task ‘:app:checkDebugDuplicateClasses’. Ionic4 Android

Query asked by user I’m currently working on an ionic4 application, but recently it stopped working while building the application on an android reall device after adding https://ionicframework.com/docs/native/fcm plugin to the application. At first it was complaining about fabric key, however I never aimed to use fabric crashlytic on my app. The error logs: * […]

ion-Checkbox only on box clickable

Query asked by user I want to separate my <ion-checkbox> from <ion-label>. So the main issue is that I have to display additional informations if you click on the label, but you should not activate the checkbox. The checkbox should only be activated, if clicked on the ‚Äúcheckbox icon/checkbox square‚Äù. <div> <ion-list> <ion-item *ngFor=”let list […]

Ionic select list of cards

Query asked by user I’m trying to select a list of categories on clicking. When I click, the background color must change and if I click another time on the same, the background must return to default color. I need to be able to have a list of all categories if I have not select […]