import { Platform } from 'ionic-angular';
class Example {
constructor( public platform: Platform ) {
if (this.platform.is("cordova")) {
// cordova環境
} else {
// 非Cordova環境
}
}
}
ionic-nativeモジュールを使うかどうかの判別によく使うのでメモ
Go to list of users who liked
More than 5 years have passed since last update.
import { Platform } from 'ionic-angular';
class Example {
constructor( public platform: Platform ) {
if (this.platform.is("cordova")) {
// cordova環境
} else {
// 非Cordova環境
}
}
}
ionic-nativeモジュールを使うかどうかの判別によく使うのでメモ
Register as a new user and use Qiita more conveniently
Go to list of users who liked