Module Pages

Index

Interfaces

Classes

Functions

Functions

define(uri: string, members: IPageControlMembers): PageControl

Creates a new PageControl from the specified URI that contains the specified members. Multiple calls to this method for the same URI are allowed, and all members will be merged.

Parameters

  • uri: string

    The URI for the content that defines the page.

  • members: IPageControlMembers

    An object that defines the members that the control will have.

Returns

PageControl

A constructor function that creates the PageControl.

get(uri: string): Function

Gets an already-defined page control for the specified URI, or creates a new one.

Parameters

  • uri: string

    The URI for the content that defines the page.

Returns

Function

A constructor function that creates the page.

render(uri: string, element: HTMLElement, options?: any, parentedPromise?: Promise): Promise

Creates a PageControl from the specified URI and inserts it inside the specified element.

Parameters

  • uri: string

    The URI for the content that defines the page.

  • element: HTMLElement

    The DOM element to which the PageControl is appended.

  • options?: any optional

    An object that contains one or more property/value pairs to apply to the new PageControl. How these property/value pairs are used (or not used) depends on the implementation of that particular PageControl.

  • parentedPromise?: Promise optional

    A Promise that is fulfilled when the new PageControl is done rendering and its contents becomes the child of element.

Returns

Promise

A promise that is fulfilled when rendering is complete, if asynchronous processing is necessary. If not, returns nothing.