Home Reference Source
public class | source

App

You can directly use an instance of this class. app

Application.

Constructor Summary

Public Constructor
public

Member Summary

Private Members
private

Page area replaced if path changed.

private

_preCtx: *

private

Root area.

private

_router: *

Method Summary

Public Methods
public

activate(rootViewClass: Class<View>, routeMap: Object, opts: Object)

Activate application

public

Back page.

public

go(path: string, ctx: Object): boolean

Go a page.

public

replace(page: Class<Page>, ctx: *)

Replace page.

Private Methods
private

_replaceContent(page: Class<Page>, ctx: Object)

Replace layer.

private

Update page title of browser

Public Constructors

public constructor() source

Private Members

private _curPage: Page source

Page area replaced if path changed.

private _preCtx: * source

private _rootArea: View source

Root area.

private _router: * source

Public Methods

public activate(rootViewClass: Class<View>, routeMap: Object, opts: Object) source

Activate application

Params:

NameTypeAttributeDescription
rootViewClass Class<View>

root view class.

routeMap Object

routing map.

opts Object
  • optional

options.

opts.mode Object
  • optional

HISTORY or HASH

opts.rootPath Object
  • optional

history root path.

opts.pathHead Object
  • optional

hash path prefix.

public back(): boolean source

Back page.

Return:

boolean

always false.

public go(path: string, ctx: Object): boolean source

Go a page.

Params:

NameTypeAttributeDescription
path string

URL path

ctx Object

context

Return:

boolean

always false.

public replace(page: Class<Page>, ctx: *) source

Replace page.

Params:

NameTypeAttributeDescription
page Class<Page>

Page class

ctx *

context

Private Methods

private _replaceContent(page: Class<Page>, ctx: Object) source

Replace layer.

Params:

NameTypeAttributeDescription
page Class<Page>

new page class.

ctx Object

passing context.

private _updateTitle() source

Update page title of browser