ionic3

Virtual scroll ion-img tag overlapping to another ion card

五迷三道 提交于 2019-12-02 11:02:53
问题 I have a problem using ion-img in virtual scroll, when im not going to set the width and height of the ion-img tag it shows a tiny image. But when I set some width and height on it it overlaps to another card which is not right below is the code that i am using <ion-list [virtualScroll]="posts" [approxItemHeight]="'150px'"> <div *virtualItem="let post" style="width: 100%"> <ion-card class="adv-map"> <ion-item> <ion-avatar item-start> <img src="img/marty-avatar.png"> </ion-avatar> </button> --

ionic3 - ERROR Error: Uncaught (in promise): Error: InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe'

陌路散爱 提交于 2019-12-02 10:53:08
I did a news comment function by ionic3 with firebase, after testing comment function working already, but when I want the comment showing in my project error coming out. ERROR Error: Uncaught (in promise): Error: InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe' My project follow this TUTORIAL . html file <ion-list> <ion-item-group *ngFor="let contact of contactsList | async"> <ion-item> {{contact.$value}} </ion-item> </ion-item-group> </ion-list> <ion-list> <ion-row> <ion-col col-6> <ion-input type="text" [(ngModel)]="Contact" placeholder="写评论..."></ion-input> </ion-col> <ion-col>

how to update a vaiable in component.ts file from another ts file

孤者浪人 提交于 2019-12-02 10:37:09
问题 initially my app.component.ts file is loaded then I have two variable name and email which is updated from an API get call, in order to make this api call I need username if I dont have the username I will be not able to update this name and email. I will be able to make the api call once i got the username but my username will be available after the login success only. my app.html has this and the below code is a part of my sidemenu <ion-item class="profile-info"> <ion-icon name="person"

Changes are not getting reflected in Ionic 3 app even after successful build

爱⌒轻易说出口 提交于 2019-12-02 10:13:20
I met a problem for 3 days with my application ionic 3. In fact, after builder in prod and release mode, it is always the old version that is always taken into account. the changes do not reflect. So when mode debug, the changes are well taken. I tried several solutions may nothing. Ionic v3 Also i have tried many solutions but no changes ionic cordova platforms rm android ionic cordova platforms add android ionic cordova build android --prod --release --aot ------------no change------------- I have downgrade the app-scripts version always same i have delete the www folder and run ionic serve

Send Ionic 3 Local Notification every day at a specific time

ⅰ亾dé卋堺 提交于 2019-12-02 08:38:40
问题 I have added the Ionic 3 local notification plugin to my project using these commands: ionic cordova plugin add cordova-plugin-local-notification npm install --save @ionic-native/local-notifications I added all dependencies on my constructor. My code is: let year = new Date().getFullYear(); let month = new Date().getMonth(); let day = new Date().getDate(); let time1 = new Date(year, month, day, 10, 00, 0, 0); let time2 = new Date(year, month, day, 12, 00, 0, 0); this.localNotifications

How to orderBy the closest distance from current location in AngularFire2?

强颜欢笑 提交于 2019-12-02 07:29:24
I am using AngularFire2 library to query in firebase. In my firebase, i have data collection and in them, i have many rows with latitude and longitude like below: - data - 1404033346513076_1998422263740845 - location - latitude: 23.7907795 - longitude: 90.403898 - 1404033346513076_1998422263740888 - location - latitude: 23.9907795 - longitude: 91.403898 I have the latitude and longitude of my current location and i have a helper function which can determine the distance in meters between the current location and a location from the firebase data. Suppose, the function is like below:

Virtual scroll ion-img tag overlapping to another ion card

三世轮回 提交于 2019-12-02 06:45:13
I have a problem using ion-img in virtual scroll, when im not going to set the width and height of the ion-img tag it shows a tiny image. But when I set some width and height on it it overlaps to another card which is not right below is the code that i am using <ion-list [virtualScroll]="posts" [approxItemHeight]="'150px'"> <div *virtualItem="let post" style="width: 100%"> <ion-card class="adv-map"> <ion-item> <ion-avatar item-start> <img src="img/marty-avatar.png"> </ion-avatar> </button> --> <h2>{{ post.name }} </h2> <p>{{ post.date_posted }}</p> </ion-item> <ion-img [width]="imgWidth"

Send Ionic 3 Local Notification every day at a specific time

可紊 提交于 2019-12-02 05:13:57
I have added the Ionic 3 local notification plugin to my project using these commands: ionic cordova plugin add cordova-plugin-local-notification npm install --save @ionic-native/local-notifications I added all dependencies on my constructor. My code is: let year = new Date().getFullYear(); let month = new Date().getMonth(); let day = new Date().getDate(); let time1 = new Date(year, month, day, 10, 00, 0, 0); let time2 = new Date(year, month, day, 12, 00, 0, 0); this.localNotifications.schedule([ { id: 1, title: 'My first notification', text: 'First notification test one', trigger: { at: new

Paths must be non-empty strings and can't contain “.”, “#”, “$”, “[”, or “]” [duplicate]

允我心安 提交于 2019-12-02 04:57:22
This question already has an answer here: Object returned from Firebase signIn 1 answer I am trying to register with firebase and ionic, but I face the problem from the beginning of the day, ERROR Error: Reference.child failed: First argument was an invalid path = "undefined". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]", can anyone help me with that this is the provider: import * as firebase from 'firebase'; import { Injectable } from '@angular/core'; /* Generated class for the UserServiceProvider provider. See https://angular.io/guide/dependency-injection for

ionic 3 - What is the best practice to share variables across the application

五迷三道 提交于 2019-12-02 04:08:57
For ionic 3 - what is the best practice to share variables across the application? For example, if I have a generic variable or generic array and I want it to be available across all source files in the application, what is the best way to do it? Should I use a provider and create getter functions or maybe there is some better and simple way to do it, such like header files in c? I would follow the Angular documentation for the Core-feature model. Which means creating a common module for your application wide singleton services (providers). Where you import those services and add them to the