Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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));
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));
import {
Component,
OnsenModule,
NgModule,
CUSTOM_ELEMENTS_SCHEMA
} from 'ngx-onsenui';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
@Component({
selector: 'app',
template: `
<div class="center">Example</div>
<div class="content">
<div style="text-align: center; margin: 10px">
<p>Hello World!</p>
</div>
</div>
`
})
export class AppComponent {
}
<div class="center">Example</div>
<div class="content">
<div style="text-align: center; margin: 10px">
<p>Hello World!</p>
</div>
</div>
`
})
export class AppComponent {
}
@NgModule({
imports: [OnsenModule],
declarations: [AppComponent],
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
class AppModule { }
platformBrowserDynamic().bootstrapModule(AppModule);