Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229331

PWA desktop form inputs

$
0
0

Instead of media queries, you can also use platform to detect if you are on a desktop device.

import { Platform } from 'ionic-angular';

@Component({...})
export MyPage {
  constructor(public plt: Platform) {
    if (this.plt.is('core')) {
      // This will only print when on a desktop device
      console.log('I am a desktop device!');
    }
  }
}

Viewing all articles
Browse latest Browse all 229331

Trending Articles



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