| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Git
- error
- 알고리즘
- Web
- effective
- 후기
- jface
- javascript
- 스프링
- java8
- 자바스크립트
- Spring
- 독후감
- 자바
- RCP
- 백준
- kibana
- boot
- 엘라스틱서치
- 이펙티브
- java
- nodejs
- node
- elasticsearch
- Spring Boot
- 맛집
- MySQL
- 인터페이스
- 리뷰
- JPA
Archives
- Today
- Total
wedul
ionic2 현재 플랫폼 확인 방법 본문
반응형
// platform 확인을 위한 모듈 추가
import { Platform } from 'ionic-angular';
// app.component.ts 파일에서 플랫폼 확인
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | @Component({ templateUrl: 'app.html' }) export class MyApp { rootPage = HomePage; constructor(platform: Platform) { platform.ready().then(() => { if (this.platform.is('android')) { console.log("running on Android device!"); } if (this.platform.is('ios')) { console.log("running on iOS device!"); } if (this.platform.is('mobileweb')) { console.log("running in a browser on mobile!"); } }); } } | cs |
반응형
'하이브리드 > 아이오닉' 카테고리의 다른 글
| ionic 파일구조 설명 (0) | 2018.05.27 |
|---|---|
| 아이오닉 실행방법 (0) | 2018.05.27 |
| ionic back button 제거 (0) | 2018.05.27 |
| 백그라운드 상태에서 활성화 되었을때 동작 수행 (0) | 2018.05.27 |
| UI 요소 동적으로 disabled 처리 (0) | 2018.05.27 |
