device.service.ts 391 B

12345678910111213141516171819
  1. import { Injectable } from '@angular/core';
  2. import { Platform } from '@ionic/angular';
  3. @Injectable({
  4. providedIn: 'root'
  5. })
  6. export class DeviceService {
  7. get isIOS(): boolean {
  8. if(this.platform.is('hybrid')){
  9. return this.platform.is('ios');
  10. }else{
  11. return false
  12. }
  13. }
  14. constructor(
  15. private platform: Platform
  16. ) {
  17. }
  18. }