The 2017 Ionic Developer Survey Results are in!

App

Improve this doc

App is a utility class used in Ionic to get information about various aspects of an app

Instance Members

getActiveNav()

Returns: NavController

Returns the first Active Nav Controller from the list. This method is deprecated

getActiveNavContainers()

getActiveNavs()

Returns: NavController[]

Returns the active NavControllers. Using this method is preferred when we need access to the top-level navigation controller while on the outside views and handlers like registerBackButtonAction()

getRootNav()

getRootNavById()

Returns: NavController

Returns the root NavController

getRootNavs()

isScrolling()

Boolean if the app is actively scrolling or not.

Returns: boolean

returns true or false

setTitle(val)

Sets the document title.

Param Type Details
val string

Value to set the document title to.

viewDidEnter

Observable that emits after any view is entered in the app.

Returns: Observable

Returns an observable

viewDidLeave

Observable that emits after any view is exited in the app.

Returns: Observable

Returns an observable

viewDidLoad

Observable that emits whenever a view loads in the app.

Returns: Observable

Returns an observable

viewWillEnter

Observable that emits before any view is entered in the app.

Returns: Observable

Returns an observable

viewWillLeave

Observable that emits before any view is exited in the app.

Returns: Observable

Returns an observable

viewWillUnload

Observable that emits before any view unloads in the app.

Returns: Observable

Returns an observable

Sass Variables

All

Property Default Description
$font-size-root 62.5%

Font size of the root html

$headings-font-weight 500

Font weight of all headings

$headings-line-height 1.2

Line height of all headings

$h1-font-size 2.6rem

Font size of heading level 1

$h2-font-size 2.4rem

Font size of heading level 2

$h3-font-size 2.2rem

Font size of heading level 3

$h4-font-size 2rem

Font size of heading level 4

$h5-font-size 1.8rem

Font size of heading level 5

$h6-font-size 1.6rem

Font size of heading level 6

$include-responsive-utilities true

Whether to include all of the responsive utility attributes

$include-text-alignment-utilities $include-responsive-utilities

Whether to include all of the responsive text alignment attributes

$include-text-transform-utilities $include-responsive-utilities

Whether to include all of the responsive text transform attributes

$include-float-element-utilities $include-responsive-utilities

Whether to include all of the responsive float attributes

$screen-breakpoints ( xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px )

The minimum dimensions at which your layout will change, adapting to different screen sizes, for use in media queries

API

Native

General