ionic3

Module parse failed: Unexpected token ionic 3

◇◆丶佛笑我妖孽 提交于 2020-01-02 15:55:23
问题 After upgrading to the latest module of ionic and ionic-angular am getting this error. Here is my Package.json file after upgrading.. Here is my Package.json file after upgrading.. Runtime Error Module parse failed: Unexpected token (84:1254) You may need an appropriate loader to handle this file type. | HomelistPage = __decorate([ | Component({ | selector: 'page-homelist',template:/*ion-inline-start:"/Users/macbook/Downloads/studio/src/pages/home/homelist/homelist.html"*/`<ion-header>\n <ion

How to check if two fields are equal in Angular / Ionic?

梦想与她 提交于 2020-01-02 10:26:06
问题 I am wanting to check if the values of two fields are the same, these fields must be passed by parameters to the validation function, I am doing this, the problem is that it can not get the value of the field, it appears null, as Can I get the values correctly and dynamically? My form builder, I'm using the match function to check the cell_phone and confirmation fields. this.recharge = this.formBuilder.group({ cell_phone: ['', Validators.required, Validations.match('cell_phone', 'cell_phone

Ionic 3 - I want a modal screen not full size

烈酒焚心 提交于 2020-01-02 05:46:12
问题 I need a modal page with no full size (80% width, <60% height, centered) to select some items, like an alert control. How to implement the CSS for this case? 回答1: Initialize modal with cssClass let modal = this.modalCtrl.create(CustomSelectPage, {data: data}, {cssClass: 'select-modal' }); Then add CSS to the class in app.scss .select-modal { background: rgba(0, 0, 0, 0.5) !important; padding: 20% 10% !important; } Change the numbers according to your design. 来源: https://stackoverflow.com

Ionic 3 and Ngzone is not working - not updating the results to HTML view

笑着哭i 提交于 2020-01-02 03:36:06
问题 I want to perform some action after Bluetooth connection is done and vice versa. Handled scenarios for connection and added success and failure handler also, and changing a flag to True and False in those handler functions. I printed that value using console.log, it changes in a component file but does not reflect in HTML. I tried using ngZone , but it's not working. Success and failure handle code are as follows: BluetoothService import { Injectable } from "@angular/core"; import { BLE }

Change NavBar color for all the pages in ionic

▼魔方 西西 提交于 2020-01-02 03:33:29
问题 I am new in ionic and wants to learn it. my question is How to change nav bar color for all the pages in ionic 3. I have been using following code <ion-header> <ion-navbar color="primary"> <button ion-button menuToggle> <ion-icon name="menu"></ion-icon> </button> <ion-title>Hello Ionic</ion-title> </ion-navbar> </ion-header> Is there any way to change nav bar color for all the pages instead of manually doing <ion-navbar color="primary"> 回答1: Add following line to variables.scss file to change

Build Error -Ionic Cordova fails for android [duplicate]

我的未来我决定 提交于 2020-01-02 03:15:10
问题 This question already has answers here : Running “cordova build android” - unable to find attribute android:fontVariationSettings and android:ttcIndex (27 answers) Closed last year . I get following error while running the command "ionic cordova build android --stacktrace" : :generateDebugResources :mergeDebugResources :processDebugManifest :processDebugResources ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings FAILED ERROR: In <declare

Ionic 3 Project does not have config.xml

假装没事ソ 提交于 2020-01-02 01:13:20
问题 I was trying to follow this tutorial: https://www.youtube.com/watch?v=SOOjamH1bAA. But I couldn't even begin, because from what it looks like, my project does not have a config.xml file and I tried looking up the documentation online, and it says nothing about it, I also tried searching how to generate it, didn't find anything, why am I missing this config.xml? how to generate this file? Here's a link to display where its supposed to be, and it's not there: heres the ionic info output: Ionic:

Ionic InAppBrowser on Android doesn't navigate to custom Url Scheme

大憨熊 提交于 2020-01-01 19:41:50
问题 I am having a setup, where I open a url in the plugin InAppBrowser with target '_blank'. The plugin Deeplinks is also installed and configured. const browser: InAppBrowserObject = this.iab.create(url, '_blank', <InAppBrowserOptions>{ location: "no", toolbar: "no", footer: "no" }); browser.on('loadstart').subscribe((event: InAppBrowserEvent) => { console.log(event); if (event.url.indexOf('wflwr://payment/success') > -1) { browser.close(); } if (event.url.indexOf('wflwr://payment/cancel') > -1)

FormControl debounceTime not available in angular 5 (ionic 3)

一曲冷凌霜 提交于 2020-01-01 10:14:10
问题 I just updated angular in ionic app from version 4 to 5. I have some search FormControl inputs that allow user to search a database via ajax requests. I used debounceTime() method to delay ajax search request but after angular upgrade this method is no longer available. I removed this method call but now a new request is made on every user key press on android. Is there any other way to achieve this delay? this.searchControl.valueChanges .debounceTime(2000) .subscribe(search => this.getCities

Ionic cordova-plugin-qrscanner has no camera preview

◇◆丶佛笑我妖孽 提交于 2020-01-01 09:37:09
问题 I run a simple demo to use cordova-plugin-qrscanner, it can scan qrcode but no camera preview. qrscannerDemo on Github Related code blow: import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import { AndroidPermissions } from '@ionic-native/android-permissions'; import { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner'; @Component({ selector: 'page-home', templateUrl: 'home.html' }) export class HomePage { constructor(public navCtrl: