Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 48980 articles
Browse latest View live

Ionic app Crashes on After First Page Change on Android

$
0
0

@shvhh wrote:

My Ionic app Crashes on First Page Change on Android That means First Page Open SuccessFully .Although when I Change WebView Implementation to latest version of chrome in developer option it works fine.Also its not working on older version of chrome and Android System Webview.

package.json

{
  "name": "myNewProject",
  "version": "0.0.13",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "start": "ionic-app-scripts serve",
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "merge": "git checkout master && git pull && git checkout development && git merge master && git commit -am 'merge with master'",
    "apk": "ionic cordova build android && node updateVersion.js",
    "run": "ionic cordova run android && node updateVersion.js"
  },
  "dependencies": {
    "@angular/animations": "5.2.11",
    "@angular/common": "5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/compiler-cli": "5.2.11",
    "@angular/core": "5.2.11",
    "@angular/forms": "5.2.11",
    "@angular/http": "5.2.11",
    "@angular/platform-browser": "5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@ionic-native/android-permissions": "^4.16.0",
    "@ionic-native/core": "~4.11.0",
    "@ionic-native/fcm": "^4.13.0",
    "@ionic-native/file": "^4.15.0",
    "@ionic-native/file-opener": "^4.19.0",
    "@ionic-native/file-transfer": "^4.15.0",
    "@ionic-native/geolocation": "^4.19.0",
    "@ionic-native/in-app-browser": "^4.12.0",
    "@ionic-native/native-geocoder": "^4.19.0",
    "@ionic-native/splash-screen": "~4.11.0",
    "@ionic-native/status-bar": "~4.11.0",
    "@ionic/cli-plugin-cordova": "^1.6.2",
    "@ionic/storage": "2.1.3",
    "angularfire2": "^5.0.0-rc.9",
    "cordova-android": "7.1.2",
    "cordova-browser": "5.0.4",
    "cordova-plugin-android-permissions": "^1.0.0",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-fcm": "^2.1.2",
    "cordova-plugin-fcm-with-dependecy-updated": "^2.2.6",
    "cordova-plugin-file": "^6.0.1",
    "cordova-plugin-file-opener2": "2.1.4",
    "cordova-plugin-file-transfer": "^1.7.1",
    "cordova-plugin-geolocation": "4.0.1",
    "cordova-plugin-inappbrowser": "^3.0.0",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^2.2.3",
    "cordova-plugin-nativegeocoder": "3.1.3",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-sqlite-storage": "^2.5.1",
    "firebase": "^4.6.0",
    "ionic-angular": "3.9.2",
    "ionic3-calendar-en": "^1.1.3",
    "ionicons": "3.0.0",
    "moment": "^2.22.2",
    "rxjs": "5.5.11",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.2.0",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-sqlite-storage": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-inappbrowser": {},
      "cordova-plugin-fcm": {},
      "cordova-plugin-fcm-with-dependecy-updated": {},
      "cordova-plugin-file-transfer": {},
      "cordova-plugin-file": {},
      "cordova-plugin-android-permissions": {},
      "cordova-plugin-geolocation": {},
      "cordova-plugin-nativegeocoder": {},
      "cordova-plugin-file-opener2": {
        "ANDROID_SUPPORT_V4_VERSION": "27.+"
      }
    },
    "platforms": [
      "browser",
      "android"
    ]
  }
}

config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.ionic.io" version="0.0.13" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Myapp</name>
    <description>An awesome Ionic/Cordova app.</description>
    <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <preference name="ScrollEnabled" value="false" />
    <preference name="android-minSdkVersion" value="19" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="1000" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="90000" />
    <platform name="android">
        <allow-intent href="market:*" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
        <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
    </platform>
    <plugin name="cordova-plugin-fcm" spec="^2.1.2" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
    <plugin name="cordova-plugin-device" spec="^2.0.2" />
    <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
    <plugin name="cordova-plugin-ionic-webview" spec="^2.1.4">
        <variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
    </plugin>
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.1.2" />
    <plugin name="cordova-sqlite-storage" spec="^2.4.0" />
    <plugin name="cordova-plugin-inappbrowser" spec="^3.0.0" />
    <plugin name="cordova-plugin-fcm-with-dependecy-updated" spec="^2.2.4" />
    <plugin name="cordova-plugin-file" spec="^6.0.1" />
    <plugin name="cordova-plugin-file-transfer" spec="^1.7.1" />
    <plugin name="cordova-plugin-android-permissions" spec="1.0.0" />
    <plugin name="cordova-plugin-android-permissions" spec="^1.0.0" />
    <plugin name="cordova-plugin-geolocation" spec="4.0.1" />
    <plugin name="cordova-plugin-nativegeocoder" spec="3.1.3" />
    <plugin name="cordova-plugin-file-opener2" spec="2.1.4">
        <variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
    </plugin>
    <engine name="browser" spec="5.0.4" />
    <engine name="android" spec="7.1.2" />
</widget>

Posts: 1

Participants: 1

Read full topic


Display Image to HMTL from API

$
0
0

@andreasTedja wrote:

Hi Master,

I want to display image from data API to HTML.
For your reference please see code below.

HTML

ion-header>
  <ion-toolbar>
    <ion-buttons end>
        <button (click)="shopingCart()">
            <ion-icon class="ionIcon" md="md-cart" ios="ios-cart"></ion-icon>
          </button> 
      </ion-buttons>
    
  <ion-navbar>
    <ion-title>Produk</ion-title>
  </ion-navbar>
</ion-toolbar>
</ion-header>

 <!--(tap)=depth3(takeData)-->
<ion-content>
    <ion-list>
      <ion-item class="page-produk" *ngFor="let takeData of listProduct">
        <button (tap)="productDetail(takeData)">Product Name: {{takeData.name}}</button> 
        <h3>Harga :{{takeData.cogs | number:'1.0-0'}}</h3>
        <ion-thumbnail>
          <ion-img style="width: 640px; height: 480px;" (tap)="productDetail(takeData)" src="http://127.0.0.1{{takeData.image_name}}"></ion-img>
        </ion-thumbnail> 

      </ion-item>
    </ion-list>
</ion-content>

file .ts


import { Component } from '@angular/core';
import { NavController, NavParams, LoadingController } from 'ionic-angular';
import { HttpClient } from '@angular/common/http';
import { Storage } from '@ionic/storage';
import { ProdukDetailPage } from '../produk-detail/produk-detail';
import { ShopCartPage } from '../shop-cart/shop-cart';

@Component({
  selector: 'page-produk',
  templateUrl: 'produk.html',
})
export class ProdukPage {
  inventori: any;



  constructor(public navCtrl: NavController, 
    public navParams: NavParams,
    public http: HttpClient,
    public httpClient: HttpClient,
    public loadingCtrl: LoadingController,
    private storage: Storage) {
      this.selectProduct()
  }
  selectProduct(){
    let loader = this.loadingCtrl.create();
    loader.present();

    let filter = [];

          filter.push({
            field: 'location_id',
            operator: 'eq',
            value: '1',
            mode: 'and'
            });
       
          filter.push({
            field: 'category_id',
            operator:'eq',
            value: this.navParams.get('id'),
            mode: 'and'
      });
  
    let param = { 
      api_token: '086090c7-2c12-4f00-9ac1-1234e3324a51',
      filter: JSON.stringify(filter)

    };  

   this.storage.get('user_api').then((userApi => {
    let apiUrl = userApi+'/products';
    this.httpClient.post(apiUrl, null, {params: param}).subscribe(
    getData => {
        this.listProduct= getData['products'];
        loader.dismiss();
    }, err => {
        console.log(err);
       });
    }));
 
  
  }
  productDetail(takeData){
    this.navCtrl.push(ProdukDetailPage, {
      id:takeData.product_id 
   });
  
  }
  
  ionViewDidLoad() {
    console.log('ionViewDidLoad ProdukPage');
    
  }
  shopingCart(){
    this.navCtrl.push(ShopCartPage)
  }
}

data from API JSON

"products": [
        {
            "id": 5,
            "cogs": "55000.000",
            "name": "D-200/PJ",
            "image_name": "5_1228022203.jpg",
            "inventory__quantity": 55
        },

i hope you can help me. thank you

Posts: 1

Participants: 1

Read full topic

Ionic install app

$
0
0

@abbashere wrote:

Getting error when start with

ionic start myApp tabs

Downloading and extracting tabs starter (100.00%)
events.js:193
throw er; // Unhandled ‘error’ event
^

ZlibError: zlib: Cannot read property ‘length’ of null

Posts: 1

Participants: 1

Read full topic

List of all Ionic 4 CSS Variables

$
0
0

@mathisschuelingkamp wrote:

Hey there!
Is there a list of all currently existing CSS4 variables to use?
I’m trying to figure out how to customize third party components like ionic2-calendar in Ionic 4.
It would be really nice to have such a list.

Thanks!

Posts: 1

Participants: 1

Read full topic

Inappbrowser & filedown

$
0
0

@wysong wrote:

Hello there!

I want to use a in-app-browser to open a specific web page and then download the file from that web page.

options = zoom no, location no

const browser = this.inappbrowser.create(‘http://www.naver.com’, ‘_blank’, options);

If you go to the web page and click download the file, there is no response.

  • .jpg If you click on the image file, it becomes an image view.

However, if you click on a * .pptx or * .pdf file, nothing happens.

If you open the page with ‘_system’, it will be downloaded using system browser.

Tell us how to download the file using ‘_blank’.

Thank you for your help.

Posts: 1

Participants: 1

Read full topic

Is there a way to test if a lazy loaded page has already been loaded?

$
0
0

@bgies wrote:

My entire PWA app is lazy loaded, and consists of over 20 pages… When users first load the app, it takes longer to load than I’d like, but I can live with that…

First, it’s a tabs app, with 5 tabs, each page being lazy-loaded. What’s happening is that the tabs are shown, and usually the home page loads fairly quickly (it’s setup with priority “high”), and the rest of the pages are priority “low”. However, most new users want to go to the profile page almost immediately. On a slow connection, the Profile page hooked to the “Profile” tab won’t be loaded yet, and for the user, the app appears to freeze.

Is there a way to know the “profile” page or any other page is loaded, so I can show a loading spinner if it’s not loaded yet?

Posts: 1

Participants: 1

Read full topic

Ion items not transparent ionic 4

$
0
0

@nagasundarkalyanv wrote:

Hello I am using Ionic 4 and unable to make ion item transparent. Please help
HTML:

<ion-header>
  <ion-toolbar>
    <ion-title>Card Tab</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content padding="5px" class="vertical-align-content">


        <ion-item class="item item-trns">
         I am Transparent
        </ion-item>
      
   

</ion-content>

SCSS:
.item.item-trns{
    border-color: rgba(0, 0, 0, 0);
    background-color:rgba(0,0,0,0);
}

Posts: 1

Participants: 1

Read full topic

How to validate a form


Ionic for desktop - strategy

$
0
0

@JerryBels wrote:

Hello guys,

I started my app with Ionic 3 believing it would really be easy to change it for desktop - a bunch of media queries and I’m good. Well, that’s what I thought…

I learned a lot about Ionic desktop these last days, and took a certain path to achieve making my app relevant in the browser. I wanted to get advices - am I complicating things too much ? Am I missing something ?

So :

  • Moving my full page’s components from AppModule to their own modules, so they have a custom url, and use IonicPage. This will be usefull for deeplinking as well so it’s a no brainer.
  • Adding ion-split-pane around my menu and content holder to get the menu as a sidebar on desktop.
  • Adding <ion-grid fixed> to every main page so it takes a fixed width.
  • When not in app (detected using Platform), changing default page from TabsPage to HomePage so tabs won’t display on bottom (which is ugly on desktop), and add links to the side menu. This is especially necessary for desktop because tabs implements their own navigation stack for each tab, which doesn’t make any sense on desktop - at least in my usecase.

That’s what I did yet. It starts to look a little better, but still - has a ton of things that doesn’t feel like desktop. The navigation buttons in navbar has to be hidden, for sure - maybe based on media queries ? Also, page transition is so mobile-like, I guess I need to change this as well based on platform.

All of these steps looks very much of a hassle to me, and I really wonder - did I miss something obvious in my researches ? Since Ionic sells itself as an amazingly easy way to make cross platform happen, and includes PWA’s heavily in the mix, I keep asking myself how is that possible ?

So, any advices are very welcome !

Thanks ahead.

Posts: 1

Participants: 1

Read full topic

JSON.Stringyfy not working

$
0
0

@sagrus wrote:

Good day)
I posted a lot of triggers in the page.
And made a array names kto for them values.
But then a made JSON.stringyfy(this.kto) fo sending array in json format i get a empty string
Why?

Page code:

> <ion-content>
>           <ion-item>
>             <ion-label><strong>Пристенки</strong></ion-label>
>           </ion-item>
>           <ion-item>
>             <ion-label>Горят все лампы освещения</ion-label>
>             <ion-toggle [(ngModel)]="this.kto['pr0']"></ion-toggle>
>           </ion-item>
>           <ion-item>
>             <ion-label>Ночные шторки на месте и в рабочем состоянии</ion-label>
>             <ion-toggle [(ngModel)]="this.kto['pr1']"></ion-toggle>
>           </ion-item>
>           <ion-item>
>             <ion-label>Стеклянные дверки (если есть) закрываются и не требуют регулировки</ion-label>
>             <ion-toggle [(ngModel)]="this.kto['pr2']"></ion-toggle>
>           </ion-item>
>           <ion-item>
>             <ion-label>Дренажные сливы чистые</ion-label>
>             <ion-toggle [(ngModel)]="this.kto['pr3']"></ion-toggle>
>           </ion-item>
>           <ion-item>
>             <ion-label>Верхние соты чистые</ion-label>
>             <ion-toggle [(ngModel)]="this.kto['pr4']"></ion-toggle>
>           </ion-item>
>           <ion-item>
>             <ion-label>Обдув свободный, вентиляторы в работе</ion-label>
>             <ion-toggle [(ngModel)]="this.kto['pr5']"></ion-toggle>
>           </ion-item>
>           <ion-item>
>             <ion-label>Температура соответствует уставке контроллера и типу хранимого продукта</ion-label>
>             <ion-toggle [(ngModel)]="this.kto['pr6']"></ion-toggle>
>           </ion-item>  
> 
>           ...    
>           
>           <ion-item>
>             <ion-label><strong>Лари для хранения заморозки и охлажденки</strong></ion-label>
>           </ion-item>
> 
> 
>           <ion-item>
>             <button color="secondary" ion-button block type="button" (click)="Check()">Check</button>    
>           </ion-item>
> </ion-content>

.ts file code:

import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';

@Component({
  selector: 'page-add',
  templateUrl: 'add.html',
})
export class AddPage {

  kto: Array<string> = [];

  constructor(
    public navCtrl: NavController, 
    public navParams: NavParams,
  ) {
    
    this.kto['pr0'] = 'false'; this.kto['pr1'] = false; this.kto['pr2'] = false; this.kto['pr3'] = false; this.kto['pr4'] = false; this.kto['pr5'] = false; this.kto['pr6'] = false; this.kto['pr7'] = false; 
    this.kto['lr0'] = false; this.kto['lr1'] = false; this.kto['lr2'] = false; this.kto['lr3'] = false;
    this.kto['chm0'] = false; this.kto['chm1'] = false; this.kto['chm2'] = false; this.kto['chm3'] = false; 
    this.kto['condens0'] = false; this.kto['condens1'] = false; this.kto['condens2'] = false; 
    this.kto['vent0'] = false; this.kto['vent1'] = false; this.kto['vent2'] = false; this.kto['vent3'] = false; this.kto['vent4'] = false; 
    this.kto['cond0'] = false; this.kto['cond1'] = false; this.kto['cond2'] = false; this.kto['cond3'] = false; 
    this.kto['tz0'] = false; this.kto['tz1'] = false; this.kto['tz2'] = false; this.kto['tz3'] = false; 
    this.kto['press0'] = false; this.kto['press1'] = false; this.kto['press2'] = false; 
    this.kto['ad0'] = false; this.kto['ad1'] = false; this.kto['ad2'] = false; 
    this.kto['pm0'] = false; this.kto['pm1'] = false; this.kto['pm2'] = false; this.kto['pm3'] = false; this.kto['pm4'] = false; 
    this.kto['cam0'] = false; this.kto['cam1'] = false; this.kto['cam2'] = false; this.kto['cam3'] = false; this.kto['cam4'] = false; this.kto['cam5'] = false; 

  }

  Check() {
    console.log(JSON.stringify(this.kto));
  }   

}

Posts: 3

Participants: 2

Read full topic

Want to customize the slider in ionic4

$
0
0

@juny58 wrote:

Hi, I see a few events are not included from swiper.js in Slides API in Ionic4 like progress. It gives progress fraction od the slide. It will be helpful in my app. The “IonSlides” is being imported from ‘@ionic/angular’. I don’t have a clue how to modify it, because I see no folder with name ‘components’ in “’@ionic/angular’”. I changed in ‘@ionic/core’ but it did not rfelect. Please help.

Posts: 1

Participants: 1

Read full topic

Ion-header/toolbar and z-index Ionic 4

$
0
0

@TrulsLoug wrote:

I’m trying to make my searchbar placed above in the ion-toolbar but when set the heigh value to where it needs to be, it disappears under the ion-toolbar although it has the z-index value of 99 and ion-toolbar has the value of 10

Screenshot under demostrates what the issue is

Posts: 1

Participants: 1

Read full topic

How to Notify to user if app update is availabe in google playstore

$
0
0

@Ferozabdul wrote:

I want to set alert box for my app. if update is available from google play store.
I went through this Link

`const updateUrl = 'https://your-remote-api.com/update.xml';    
 
console.log("update",updateUrl);    
                        
 this.appUpdate.checkAppUpdate(updateUrl).then(() => { alert("Update Available") });`

if run i run this code, my app will exit automatically

how to resolve this…

Posts: 1

Participants: 1

Read full topic

Test Ionic App to Actual Device or Emulator

$
0
0

@OliverPrimo wrote:

Hello, I am a newbie with ionic app development and I build an ionic application and it works well on the browser everytime I run a test. Now, I am trying to run my ionic application to an actual device or an emulator using the command ‘ionic cordova run android’ but I always get this error

Ionic CLI version: PRO 4.2.1
Cordova version: 8.0.0
NPM version: 6.4.1
Node.js version: 8.11.3
Visual Studio Code version: 1.30.2
Android Studio version: 3.3
Java version: 1.8.0_191

I have also tried the following tutorials but I always get the same problem.


https://moduscreate.com/blog/ionic-cordova-debug-device-visual-studio-code/

I hope someone can help me with this. Thank you in advance.

Posts: 1

Participants: 1

Read full topic

Ionic 4 - slider with searchbar, list and row of avatars

$
0
0

@Driesel wrote:

Hello all,

i try get a slider working with a searchbar and a list.

What do i want to do:
a site for creating some inputs, user goes through the slides step-by-step.
On one slide, i want to have:

  • top --> a searchbar

  • under searchbar --> a row with avatars (shows just the picture of checked item in checkbox)
    with ng-if,

  • under avatar-row --> list/checkbox with all items (searchable via searchbar)

I try to get it working with grid/col, but this leads into some strange design errors.
I also tried fixed position, but than i will have space betwenn searchbar and checkbox, when no item is checked …

Any ideas?

Posts: 1

Participants: 1

Read full topic


No provider for ChangeDetectorRef

$
0
0

@laurencehughes wrote:

I am migrating an Ionic v3 app to v4 but am coming up against an issue I can’t solve.

I receive the following error from trying to make a network request.

Error: NullInjectorError: No provider for ChangeDetectorRef!
    at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:8894) [angular]
    at resolveToken (core.js:9139) [angular]
    at tryResolveToken (core.js:9083) [angular]
    at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8980) [angular]
    at resolveToken (core.js:9139) [angular]
    at tryResolveToken (core.js:9083) [angular]
    at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8980) [angular]
    at resolveNgModuleDep (core.js:21120) [angular]
    at _createClass (core.js:21167) [angular]
    at _createProviderInstance (core.js:21137) [angular]
    at resolveNgModuleDep (core.js:21101) [angular]
    at _callFactory (core.js:21192) [angular]
    at _createProviderInstance (core.js:21140) [angular]
    at resolveNgModuleDep (core.js:21101) [angular]

This error happens at the this.http.post(...):

import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { IonNav } from '@ionic/angular';
import { SERVER_AUTH_URL } from '../../../environments/environment';

@Injectable({ providedIn: 'root' })
export class AuthenticationService {

constructor(
    private readonly http: HttpClient,
) {}

async login(loginDetails: Login): Promise<boolean> {
  const body = new HttpParams()
    .set('username', loginDetails.username)
    .set('password', loginDetails.password)
    .set('grant_type', 'password');

  const response = await this.http
    .post<AuthResponse>(SERVER_AUTH_URL, body.toString(), { headers })
    .toPromise();
}

...

How do I fix this? I cannot add ChangeDetectorRef to my providers. Some other posts recommend using ApplicationRef’s tick method but this solution doesn’t seem to make sense in my case. No network request is actually made from the browser.

HttpClientModule is in my app.module.ts imports array.


ng --version:

Angular CLI: 7.2.1
Node: 8.14.0
OS: darwin x64
Angular: 7.2.0
... common, compiler, compiler-cli, core, forms, http
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.11.4
@angular-devkit/build-angular     0.11.4
@angular-devkit/build-optimizer   0.11.4
@angular-devkit/build-webpack     0.11.4
@angular-devkit/core              7.2.1
@angular-devkit/schematics        7.2.1
@angular/cli                      7.2.1
@ngtools/webpack                  7.1.4
@schematics/angular               7.2.1
@schematics/update                0.12.1
rxjs                              6.3.3
typescript                        3.1.6
webpack                           4.23.1

Posts: 1

Participants: 1

Read full topic

[Ionic 4] What is the proper way to use the printer plugin?

Does a way to change ringtone exist?

$
0
0

@alabaere wrote:

Hello there !

I made a soundbox app with Ionic v3 and I would like to change the native ringtone.

Can I do this with Ionic ? I can’t find any plugin allowing me to do so.

Thanks :wink:

Posts: 1

Participants: 1

Read full topic

Two Icons in ion-item

$
0
0

@mdline wrote:

Hello,

I cannot put two icons on left inside ion-item.


  <ion-list>
    <button ion-item *ngFor="let person of persons" (click)="open">
     <ion-icon name="call" item-left></ion-icon>
      {{ person.email}}<br>
     <ion-icon name="mail" item-left></ion-icon>
      {{ person.telephone}}<br>
    </button>
  </ion-list>

Posts: 1

Participants: 1

Read full topic

Ionic4 clearInput color

$
0
0

@lordcoste wrote:

Hi, is there a way to change the color of the clearinput icon on ionic 4 rc?

It’s a shadow dom element with .input-clear-icon class that use a background-image svg filled with this variable color: var(–ion-color-step-600,%20%23666666).

It’s rendered as a dark grey, I’m trying to make it white.

Regards

Posts: 1

Participants: 1

Read full topic

Viewing all 48980 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>