How to use the ngx-onsenui.onsPlatform.isIPhoneX function in ngx-onsenui

To help you get started, we’ve selected a few ngx-onsenui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github puku0x / ngx-onsenui-ngrx-todo / src / main.ts View on Github external
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { onsPlatform } from 'ngx-onsenui';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

if (environment.production) {
  enableProdMode();
}

if (onsPlatform.isIPhoneX()) {
  const html = document.documentElement;
  html.setAttribute('onsflag-iphonex-portrait', '');
  html.setAttribute('onsflag-iphonex-landscape', '');
}

platformBrowserDynamic().bootstrapModule(AppModule)
  .catch(err => console.log(err));
github puku0x / cordova-template-ngx-onsenui / template_src / src / main.ts View on Github external
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { onsPlatform } from 'ngx-onsenui';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

if (environment.production) {
  enableProdMode();
}

if (onsPlatform.isIPhoneX()) {
  const html = document.documentElement;
  html.setAttribute('onsflag-iphonex-portrait', '');
  html.setAttribute('onsflag-iphonex-landscape', '');
}

platformBrowserDynamic().bootstrapModule(AppModule)
  .catch(err => console.error(err));

ngx-onsenui

Official Angular directives for Onsen UI.

Apache-2.0
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis