ionic3

Ionic firebase specify google-services.json

给你一囗甜甜゛ 提交于 2019-12-01 10:42:49
问题 I have an ionic 3 project and I wanted to add firebase to the project. I installed the firebase cordova plugin and placed my google-services.json in resources/android but I get an error while parsing google-services.json : No matching client found for package name [name here] When I look at my google-services.json that I put in resources/android the package name is correct but when I look in platforms/android the file is completely different and the package name is com.github.cordova_plugin

Ionic show ion-refresher programmatically

人走茶凉 提交于 2019-12-01 10:30:07
问题 i want to display the ion-refresher programmatically. e.g on the first page load i load the data and want to show the ion-refresher. i've not found any build in function only _beginRefresh. this function will fire the refresher, however it will not set the style attribute TOP on the refresher element. therefore it is hidden behind the NAV. currently i've created a dirty workaround. let scrollcontent = document.getElementsByClassName('ion-page')[0].getElementsByTagName('ion-content')[0]

Ionic 3 How to ensure db data fetched before view is loaded

吃可爱长大的小学妹 提交于 2019-12-01 08:14:30
问题 I'm using token based authentication and token is already saved on DB. When app starts, I need to fetch the token from DB and make it available before making API calls. What is best way to do it: In Component: ngOnit() { storage.get('token').then((val) => { Make api call here }); } Or in shared service: getToken() { return Promise((resolve, reject)=>{ #if fetched once save in local var and resolve token #or fetch from DB and resolve token }) } // On Component this.sharedService.getToken()

Angular 4 ng-repeat implementation

怎甘沉沦 提交于 2019-12-01 08:08:07
问题 I'm trying to implement a very basic ng-repeat directive for a Ionic 3 project using Angular 4. I simply don't understand why this code is not returnig anything. I guess the numerous of the Ionic and Angular documentation are confusing me.... Any idea? home.ts import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; @Component({ selector: 'page-home', templateUrl: 'home.html' }) export class HomePage { public item = {} ; public itemsList = [ {"name":"Mark",

Hide tabs in sub pages in Ionic 2 [duplicate]

心已入冬 提交于 2019-12-01 06:41:14
This question already has an answer here: How to keep tab when pushing a new page? 1 answer I try to hide tabs on all my subpages in my app. I use this : <ion-tab [root]="MyPage" tabsHideOnSubPages="true" ...></ion-tab> When I run ionic serve; it's work. But when I try to run it on my devices, my tabs aren't hide in the sub pages, and I can't use it. Someone has an idea to finally hide my tabs in my devices ? [update] In my child page I have a google map. If I delete it I don't have my problem anymore. Child page .html : <ion-header> <c-header></c-header> </ion-header> <ion-content> <div id=

Page Transition Animation in Ionic 2

Deadly 提交于 2019-12-01 06:25:05
I have simple tabs template Ionic 3 application in which, I am switching between the tabs whenever user swipes on view based on left or right I am switching between Tabs and All working fine accept there is no Animation effects when Page transition happens from tapping the tabs or from swiping the screen. I am getting the Animation for page pushing and popping this.navCtrl.push(ContactPage, { animation: true, direction: 'forward' }); but not for selecting Tabs this.navCtrl.parent.select(2,{ animation: true, direction: 'forward' }); Thanks in advance That's currently not possible with Ionic,

Ionic 3 lazy loading make lag with large html file

寵の児 提交于 2019-12-01 05:31:27
i am using ionic 3 in my project and i have some problems with lazy load. I have a ResultPage with the template resultpage.html has more than 1000 html lines code. In the HomePage i want to navigate to ResultPage by navCtrl.setRoot . When i call it, the screen freeze in 3-4s before take me to the ResultPage . It is really a bad UX. It only happen with lagre teamplate and in the first time i enter that page. I decide to remove lazy load in ResultPage and the lag disapear. I don't know is it a right way? Can some one please tell me what should i do in this case? Thanks alot! One way to hide that

cannot find symbol import com.google.firebase.iid.FirebaseInstanceIdService error in ionic3

℡╲_俬逩灬. 提交于 2019-12-01 05:19:22
I Have no idea why I am getting this error whenever I try to create my app's build.I have tried many solutions but I was unable to solve this.i don't know if any plugins is causing issues or if there's any issue with my Code or firebase or firebase connectivity.I have deleted node modules and run npm install and removed and re-added android platform but still i am getting this error. import com.google.firebase.iid.FirebaseInstanceIdService; ^ symbol: class FirebaseInstanceIdService location: package com.google.firebase.iid C:\Users\user\Downloads\mosque\platforms\android\app\src\main\java\org

Change colour navbar header Ionic 2

大城市里の小女人 提交于 2019-12-01 04:34:42
I have this problem... My colour is white right now, my code is like this: <ion-header > <ion-navbar> <ion-title> HELLO </ion-title> </ion-navbar> </ion-header> Change color with this opcion is easy (primary, secondary, danger, light, dark) <ion-header > <ion-navbar danger> <ion-title> HELLO </ion-title> </ion-navbar> </ion-header> but my problem is when I want to use custom colors. Somebody know how can I resolve it? Thanks inadvance. Best regards. There're two ways of doing this, based on if you want to change the color only in a single page, or if you want to change it in all the pages from

Ionic Uncaught (in promise): invalid link

扶醉桌前 提交于 2019-12-01 04:07:18
i have propably problem with this.nav.push in Ionic. I have done a login/registration page but when i login i get this error message. I have to add code from login.ts and e.g home.ts(which is main page) ? Runtime Error Uncaught (in promise): invalid link: HomePage Error: Uncaught (in promise): invalid link: HomePage at d ( http://localhost:8100/build/polyfills.js:3:3991 ) at l ( http://localhost:8100/build/polyfills.js:3:3244 ) at Object.reject ( http://localhost:8100/build/polyfills.js:3:2600 ) at NavControllerBase._fireError ( http://localhost:8100/build/main.js:45465:16 ) at