ionic-framework

Blank page with google maps and Ionic 3

牧云@^-^@ 提交于 2021-01-28 06:40:48
问题 Googlemaps displays a white page in Ionic 3 on browser and mobile. I have installed the plugin correctly and imported everything. When testing it prompts me to allow location then displays a white page without even a Google logo. I have tried reinstalling all plugins and checking the API key, all seems valid. .html <ion-content padding> <div #map id="map"></div> </ion-content> .module.ts import { NgModule } from '@angular/core'; import { IonicPageModule } from 'ionic-angular'; import {

Ionic3 ion-img do not show images with ng-for

旧时模样 提交于 2021-01-28 06:13:26
问题 I am trying to show the dynamic images with loop using ion-img but it is not working. <ion-item no-lines no-padding *ngFor="let company of shortedDistanceArray"> <div> <ion-img style="width: 15vh;height: 12vh;" src={{company.images}}"></ion-img> </div> </ion-item> 回答1: Here you need to use property binding as shown below. Always try to avoid string interpolation . <ion-item no-lines no-padding *ngFor="let company of shortedDistanceArray"> <div> <img style="width: 15vh;height: 12vh;" [src]=

Ionic Increment Firestore Value

微笑、不失礼 提交于 2021-01-28 05:48:36
问题 I was wondering if there was a way to increment a value in Firestore with Ionic. For example, a like button and when clicked a field value 'likes' adds +1 onto the existing value. I saw examples with 'transactions' where this is done but it was with the Realtime Database rather than the Cloud Firestore. I looked further and could not find any documentation regarding Firestore. Is there anyway to pull this off without pulling the existing value from the snapshot first? Thanks, Troy 回答1: There

How to update the value of a radio group, when changing another radio group?

被刻印的时光 ゝ 提交于 2021-01-28 03:23:58
问题 Hi have two radio groups, and i want the values to update when i change one of the radio group value, beause they are both conected. If i change the first radio group value, i want the second radio group to update. HTML: <ion-radio-group [(ngModel)]="cardOrderNumber" (ionChange)="updateCardOrdersNumber($event)"> <ion-list-header> <ion-label>{{'component.loyaltyCard.numberOfOrdersNeeded' | translate}}</ion-label> </ion-list-header> <ion-item> <ion-label>6</ion-label> <ion-radio slot="start"

firestore : Missing or insufficient permissions

╄→гoц情女王★ 提交于 2021-01-28 02:06:42
问题 I'm using Role ( allow read ,write : if request.auth.uid != null ) when I logged in I get data it's ok , but when I log out the user I get the error : Missing or insufficient permissions. first I thought it was because of I didn't unsubscribe the Observable I tried (rxjs/operator/takeWhile) even if I used async pipe, I got the same error. 回答1: if you're logged out then request.auth.id == null, therefore, your read rule returns false. try changing to: allow read; allow create: if request.auth

What is the reason for following error : NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node

大兔子大兔子 提交于 2021-01-27 22:22:09
问题 I am working on ionic react . I have an error as shown in image . I got this error on clicking a button to fetch the data from API and update the content of the page . After debugging I found that error is occurring in Ionic slides. What can be the reason and solution for the following error? <IonSlides options={slideOpts}> { assignedOrderData.map((item1: any) => item1.map((item: any) => <IonSlide> <IonGrid id='dashboard-orders'> <div onClick={() => history.push(`/myorderdetails/${item.order

how to set default time to html input field of type time in ionic

流过昼夜 提交于 2021-01-27 20:31:41
问题 I am new to Ionic, I am using html input field of type time for getting time picker in Ionic, I want to set some default time to that input field. I tried the following code. <label class="item item-input"> <span class="input-label">Time</span> <input type="time" ng-model="demoTime"> </label> My controller has: $scope.demoTime = new Date("10:45 AM"); 回答1: javaScript doesn't have times solely, we need to provide the parameter ans date-times. You can do this in following way <label class="item

how to remove ionic 4 segment indicator (bottom line)? please let me know

我是研究僧i 提交于 2021-01-27 14:33:30
问题 .segment-button-indicator { -ms-flex-item-align: end; align-self: flex-end; width: 100%; height: 2px; background-color: var(--indicator-color); opacity: 1; } I am new to hybrid app development. I have to use ion-segment. There is ion-segment-indicator which indicates bottom line in ion-segment, so I need to remove it. I can remove from these default css codes, but when I try to customize it's not removing 回答1: You cannot remove it, but you can hide it by setting it's color to transparent. On

Firestore FieldValue increment with nested object and variable field-name not working

给你一囗甜甜゛ 提交于 2021-01-27 11:23:30
问题 I understand to use Firestore FieldValue increment function in the nested object I need to mention the completed path in the update method. My Ionic 5 project's main method takes the name of the field of the object. Following are the ways I have tried to use it updateCounter(attr: string){ Way1: let obj = {}; obj[attr] = firebase.firestore.FieldValue.increment(1); //This is working obj.count[attr] = firebase.firestore.FieldValue.increment(1); //This is not working. Value is always 1 this.afs

How to use ngModel in ion-checkbox?

允我心安 提交于 2021-01-27 07:18:56
问题 I'm trying to use with ngModel, but ngModel doesn't work there. My code: <ion-checkbox *ngFor="#item of items" [(ngModel)]="item.checked"> {{item.name}} </ion-checkbox> But I get an error: EXCEPTION: Expression 'checked in AddInterestItem@5:2' has changed after it was checked. Previous value: 'false'. Current value: 'false' in [checked in AddInterestItem@5:2] example data: this.items = [ {name: 'Dancing', checked: false}, {name: 'Jazz', checked: false}, {name: 'Metal', checked: true}, {name: