Skip to main content
WinJS.Navigation.navigate function

Applies to Windows and Windows Phone

Navigates to a location with optional state values.


WinJS.Navigation.navigate(location, initialState).done( /* Your success and error handlers */ );



Type: object

The URI to navigate to.

initialState [optional]

Type: object

One or more user-defined key-value pairs.

Return value

Type: Promise

A promise that completes with a value indicating whether or not the navigation was successful.


Minimum WinJS version

WinJS 1.0



See also

For developers
WinJS.Navigation Namespace
WinJS.UI.Hub object
WinJS.UI.AppBar object
WinJS.UI.NavBar object
WinJS.UI.BackButton object
Your first app - Part 3: PageControl objects and navigation
Navigating between pages
Adding app bars
Quickstart: Using single-page navigation
Quickstart: Adding a nav bar (NavBar)
Quickstart: Using a hub control for layout and navigation
HTML Hub control sample
HTML AppBar control sample
HTML NavBar control sample
Navigation and navigation history sample
For designers
Navigation patterns
Command patterns
Bottom app bar
Top app bar
Back button
Guidelines for the hub control
Guidelines for app bars
Making the app bar accessible