ionic4

Can't deploy firebase cloud function

被刻印的时光 ゝ 提交于 2019-12-11 18:48:05
问题 I'm trying to deploy a firebase cloud function with cors but it doesn't work. This is my code bellow, can someone help me with this ? import * as functions from 'firebase-functions' import * as admin from 'firebase-admin' import * as cors from 'cors' admin.initializeApp() const corsHandler = cors({origin: true}) export const getUser = functions.https.onRequest((request, response) => { corsHandler(request, response, () => {}) admin.firestore().doc("profiles/T0XCPHPkrJM4I10okb9KSHyukqn1").get()

ionic firebase phoneAuth without recaptcha on ios

帅比萌擦擦* 提交于 2019-12-11 17:46:01
问题 I have an ionic app where i use firebase phone authentication which uses recaptcha. It works fine on android but throws error on ios saying recaptcha can only be run in an http environment. I would like to know if there's a way to perform firebase phone auth without using recaptcha. this.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container',{ 'size': 'invisible' }); let appVerifier = this.recaptchaVerifier; this.appService.sendPhoneVerification(phoneNumber,appVerifier)

How can we navigating through pages so we can create new object of a page from same page

廉价感情. 提交于 2019-12-11 17:23:42
问题 How can we create stack like structure for navigating through pages so we can create new object of a page from same page , here I want to go to SuperPage from SuperPage but angular routing does not supporting it , in IONIC3 we can achieve it very easily by push method of navCtrl but I want the navigation on the same page(SuperPage) in ionic 4 so how can we achieve this ?? import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { NavController } from

Ionic 4 - How to connect app to existing SQL Server via Web API?

眉间皱痕 提交于 2019-12-11 17:04:46
问题 Many similar questions have been asked, but none for this version of the Ionic framework and none have received answers that can actually help me. BACKGROUND: I have made an app and need to fetch data from an existing SQL Server. From research the only way this can be done is to use a Web API as a middleware seeing as Ionic cannot directly connect to SQL Server. Please refer to this tutorial as this is what I have been following: https://www.youtube.com/watch?v=Js_8ijftKC0&index=21&list

When I removed “click_action”: “FCM_PLUGIN_ACTIVITY” then Ionic 1 app's push brakes

耗尽温柔 提交于 2019-12-11 16:21:34
问题 Firebase API push payload from backend : { "registration_ids": [ "IKSiok9Zpip5cDcebQ67wc7TnpDuhMAFJm1xdGGI44s48JbXEu5iYa" ], "notification": { "body": "Push Test Facility Category", "title": null, "icon": "myicon", "sound": "mySound", "vibrate": 1, "Badge": 1, "click_action": "FCM_PLUGIN_ACTIVITY" }, "data": { "message": "Push Test Facility Category", "title": null, "b": "22", "id": "2", "category_name": "Restaurants", "h": "1", "p": 1, "type": "2" } } fcm.service.ts fcmListeners() { this

How to route within the tab component in ionic

一个人想着一个人 提交于 2019-12-11 15:30:56
问题 I am just a beginner to ionic with some angular knowledge.I have tabs template, The Activity tab will have 3 tab-buttons on the page as shown in below image: As shown in the image when the user click on: about button, the user will be routed to about page home button, the user will routed to home page contact button, the user will routed to contact page within tabs page . This scenario works fine. Now i have another page called add-contact . When the user click on add-contact button in

Ionic 4 network check

末鹿安然 提交于 2019-12-11 10:36:53
问题 How do I check of internet connectivity in each page in Ionic 4. The need is if there is an network error I need to redirect the app to an error page. 回答1: You can try the official Ionic Network plugin (doc here). Usage example from doc : import { Network } from '@ionic-native/network/ngx'; //ngx constructor(private network: Network) { } ... // watch network for a disconnect let disconnectSubscription = this.network.onDisconnect().subscribe(() => { console.log('network was disconnected :-(');

Cannot find module '@angular/core'. in my ionic app

六眼飞鱼酱① 提交于 2019-12-11 10:09:25
问题 I'm building an ionic app but when i added a new page it give me this error. Cannot find module '@angular/core' when import { Component } from '@angular/core'; I checked node_modules folder, i didn't found core folder under @angular folder. Ionic CLI version : 4.4.0 I tried to uninstall npm and reinstall it but it didn't work. Package.json File : { "name": "fuberSims", "version": "0.0.1", "author": "Ionic Framework", "homepage": "http://ionicframework.com/", "private": true, "scripts": {

How to hide onScroll header in ionic 4?

让人想犯罪 __ 提交于 2019-12-11 09:32:22
问题 I want to hide the header on scroll in Ionic 4 Beta 5. I tried all the directives solutions, but none of them work for me. So, are there any methods that work? 回答1: Use below directive import { IonContent, DomController } from '@ionic/angular'; import { Directive, ElementRef, Input, Renderer2, SimpleChanges } from '@angular/core'; @Directive({ selector: '[scrollHide]' }) export class ScrollHideDirective { @Input('scrollHide') config: ScrollHideConfig; @Input('scrollContent') scrollContent:

How to detect scroll reached end in ion-content component of Ionic 4?

自作多情 提交于 2019-12-11 07:48:51
问题 In Ionic v3 ion-content there was properties like "scrollTop". In Ionic v4 there are no more of this properties... How could I determine if a user reached the end of the content? https://ionicframework.com/docs/v3/api/components/content/Content/ https://ionicframework.com/docs/api/content 回答1: These features are still available they are just in a different location. After enabling it with scrollEvents , you need to use the ionScroll event and then calculate the height based on the results of