mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 17:42:15 +08:00
docs(app): add documentation for ion-app
This commit is contained in:
@ -12,6 +12,7 @@ import { Config } from '../../index';
|
||||
}
|
||||
})
|
||||
export class App {
|
||||
mode: string;
|
||||
|
||||
private isDevice = false;
|
||||
private deviceHacks = false;
|
||||
@ -19,7 +20,6 @@ export class App {
|
||||
@Element() el: HTMLElement;
|
||||
|
||||
@Prop({ context: 'config' }) config: Config;
|
||||
mode: string;
|
||||
|
||||
componentWillLoad() {
|
||||
this.isDevice = this.config.getBoolean('isDevice', false);
|
||||
@ -39,9 +39,9 @@ export class App {
|
||||
|
||||
render() {
|
||||
return [
|
||||
this.deviceHacks && <ion-input-shims />,
|
||||
<ion-tap-click />,
|
||||
this.isDevice && <ion-status-tap />,
|
||||
this.deviceHacks && <ion-input-shims></ion-input-shims>,
|
||||
<ion-tap-click></ion-tap-click>,
|
||||
this.isDevice && <ion-status-tap></ion-status-tap>,
|
||||
<slot></slot>
|
||||
];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
# ion-app
|
||||
|
||||
|
||||
App is a container element for an Ionic application. There should only be one `<ion-app>` element per project. An app can have many Ionic components including menus, headers, content, and footers. The overlay components get appended to the `<ion-app>` when they are presented.
|
||||
|
||||
<!-- Auto Generated Below -->
|
||||
|
||||
|
@ -13,12 +13,12 @@ export type Requires<K extends string> = {
|
||||
export function createOverlay<T extends HTMLIonOverlayElement & Requires<keyof B>, B>
|
||||
(element: T, opts: B): Promise<T> {
|
||||
// convert the passed in overlay options into props
|
||||
// that get passed down into the new alert
|
||||
// that get passed down into the new overlay
|
||||
Object.assign(element, opts);
|
||||
|
||||
element.overlayId = lastId++;
|
||||
|
||||
// append the alert element to the document body
|
||||
// append the overlay element to the document body
|
||||
const appRoot = document.querySelector('ion-app') || document.body;
|
||||
appRoot.appendChild(element);
|
||||
|
||||
|
Reference in New Issue
Block a user