Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70433

Ionic platform usage

$
0
0

@sakotturi wrote:

I’m struggling with some unexpected behavior using import { Platform } from '@ionic/angular';

I’m using public in my constructor so that I can access it directly in my template
public platform: Platform

<ion-item *ngIf="!platform.is('cordova')" lines="none">
  <ion-label>Select a Photo:</ion-label>
  <ion-input
    type="file"
    accept="image/*"
    multiple="false"
    (change)="fileChangeEvent($event)"
  ></ion-input>
</ion-item>

Because on mobile, I’m using the native photo picker.
On mac, iOS and Android this works but on Windows, the ion-item never displays.

The worst part is that I don’t have a windows computer but a my client says the File Input never shows up.
I tried using Microsoft Edge on my Mac and even setup a Virtual Machine with a Dev copy of Windows 10 but it’s a mess won’t boot. I don’t have $150 to spend on a windows license…

Is the code above ok? Can you safely access platform from the template or should I be doing all the JS checking in my component and just expose booleans in my ngIfs?

Can someone with a windows computer check to see if platform.is() runs properly on windows? (Using Chrome and Edge).

Is there a way I can rent a running windows computer that I can ssh into to run such checks on my own?

Thanks!
-Sante

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70433

Trending Articles



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