Compartir a través de


WinJS.UI.Pages.render function

Creates a PageControl from the specified Uniform Resource Identifier (URI) and inserts it inside the specified Document Object Model (DOM) element.

Syntax

WinJS.UI.Pages.render(uri, element, options, parentedPromise).done( /* Your success and error handlers */ );

Parameters

  • uri
    Type: String

    The URI for the content that defines the page.

  • element
    Type: DOMElement

    The DOM element in which the PageControl is created.

  • options [optional]
    Type: Object

    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 [optional]
    Type: Promise**

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

Return value

Type: Promise**

If asynchronous processing is necessary, a promise that is fulfilled when rendering is complete. Otherwise, nothing.

Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.UI.Pages

See also

For developers

WinJS.UI.Pages Namespace

Your first app - Part 3: PageControl objects and navigation

Navigating between pages

Quickstart: Using single-page navigation

Quickstart: Adding Page controls

Adding a Page control item template

HTML Page controls sample

Navigation and navigation history sample

For designers

Navigation patterns