docs(app): add documentation for ion-app

This commit is contained in:
Brandy Carney
2018-04-11 13:08:07 -04:00
parent 229ee845da
commit 49e5b7e016
3 changed files with 7 additions and 7 deletions

View File

@ -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>
];
}

View File

@ -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 -->

View File

@ -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);