ionic3

Preflight response is not successful with proper headers

旧巷老猫 提交于 2020-07-19 04:31:34
问题 I'm having issue getting my ionic app to POST to my API. On my api I have set the following headers: header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Headers: Content-Type"); header("Access-Control-Allow-Methods: GET,PUT,POST,DELETE,OPTIONS"); When posting from Postman or the actual website, everything functions as expected and I see these headers come back but once I open up my app and send a request, it no longer works. GET Requests are working fine, it's just POST

Google Analytics not tracking views in IOS Ionic 3 Application with GTAG.js

巧了我就是萌 提交于 2020-07-09 14:52:11
问题 I'm setting up Google Analytics in my application, I already track all events and pages. When I look the Google Analytics, the android is working perfectly, otherwise the iOS is not tracking any view or event. I tried change the iOS version, but nothing change. <script src="https://www.googletagmanager.com/gtag/js?id=UA-XXX-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-XXX-1', { 'page

ngx translate not working on iOS device

∥☆過路亽.° 提交于 2020-07-09 13:54:26
问题 I have an ionic 3 project and I want to use ngx translate. It works in the browser and the iOS simulator but not on a real device (tested on iPhone SE, iOS 11.1). app.module.ts import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; import { TranslateHttpLoader } from '@ngx-translate/http-loader'; import { HttpClient, HttpClientModule } from '@angular/common/http'; export function HttpLoaderFactory (http: HttpClient) { return new TranslateHttpLoader(http, './assets/i18n/', '

IONIC 3: onNotification not fire in foreground in IOS?

喜欢而已 提交于 2020-07-09 12:12:05
问题 I have implemented push notification in ionic Everything working fine on android and but in IOS got different scenario: in foreground : onNotification is not fired as well as android working perfect. Background: push notification is received but after tap from notification nothing happend app.component.ts this.fcm.onNotification().subscribe(data => { if(data.wasTapped){ console.log(data.wasTapped); //redirectPageViaNotificationType for redirect page... this.redirectPageViaNotificationType

IONIC 3: onNotification not fire in foreground in IOS?

守給你的承諾、 提交于 2020-07-09 12:11:51
问题 I have implemented push notification in ionic Everything working fine on android and but in IOS got different scenario: in foreground : onNotification is not fired as well as android working perfect. Background: push notification is received but after tap from notification nothing happend app.component.ts this.fcm.onNotification().subscribe(data => { if(data.wasTapped){ console.log(data.wasTapped); //redirectPageViaNotificationType for redirect page... this.redirectPageViaNotificationType

Ionic3 - Can't bind to 'textMask' since it isn't a known property of 'ion-input'

一个人想着一个人 提交于 2020-07-07 18:59:45
问题 I am trying to use textMask on ionic 3, but it's not working I am getting error message (Can't bind to 'textMask' since it isn't a known property of 'ion-input') . I am following Joshmorony's tutorial https://www.joshmorony.com/improve-mobile-form-ux-with-input-masks/ Click here to see the error message app.module.ts import { TextMaskModule } from 'angular2-text-mask'; @NgModule({ imports: [ FormsModule, TextMaskModule ], contact.html <ion-input type="tel" [(ngModel)]="phoneNumber" [textMask]

host-context not working in Angular

两盒软妹~` 提交于 2020-06-27 12:45:15
问题 The button background is red, when it should be green i.e. the conditional styling controlled by :host-context is not activated? Child component styles commander.scss commander { button { background-color: red; } :host-context(.enough-space) .btn-theme { background-color: green; } } Child component template commander.html <button class="btn-theme" (click)="demand()">{{requestText}}</button> Host component template front.html ... <commander (command)="requestPage()" [requestText]="requestText"

Swipe through segment tabs - Ionic 3

狂风中的少年 提交于 2020-06-26 11:19:30
问题 The code below uses segments from ionic 3. docs show the use of ngSwitch, ngModel. but I would like to simply swipe on the segment and switch to another segment tab. How can I achieve this? I am not interested in swiping the tabs at the top but by swiping on the content i would like to change the segment tab. <ion-content padding> <div> <ion-segment [(ngModel)]="abc"> <ion-segment-button value="Segment1"> Segment Title </ion-segment-button> <ion-segment-button value="segment2"> Segment Title

Display duplicate events after update firestore data, but the data itself in firestore isn't duplicated

旧街凉风 提交于 2020-06-25 07:32:07
问题 I have a web application(Angular) and mobile application(Ionic). Both of them share the same Firestore data. Use web application update existing data but the ionic app shows duplicate items(the duplicates will be gone after restart the mobile app), I check the item data itself in Firestore, it was updated and unique. Does anyone have any clue on this? This issue only occurs on the mobile app other than the web app, both of them use "angularfire2": "^5.0.0-rc.4", import { AngularFirestore,

Ionic : Ion-slides- Only First Slide appearing

寵の児 提交于 2020-06-17 09:51:04
问题 I'm trying to add ion-slides to my app, but i'm facing a problem that i don't have any idea how to solve it. I simple added the ion-slides example to my page: <ion-slides> <ion-slide> <h1>Test</h1> </ion-slide> <ion-slide> <h1>Test2</h1> </ion-slide> <ion-slide> <h1>Test3</h1> </ion-slide> </ion-slides> And even with this simple example, the component just shows the first slide. When i try to swipe to the next one, it shows a blank slide, even though it's possible to inspect this element and