Skip to main content
Use this API to navigate to a new page within the Mini Program. The current page is preserved in the page stack, allowing users to return with my.navigateBack.

Parameters

The maximum page stack depth is 10. You can call navigateTo at most 10 times before needing to navigate back or use other navigation methods.

Code Example

Basic Navigation

With Query Parameters

Receiving Parameters

With Callbacks

Use Cases

Important Notes

  • Cannot navigate to tab bar pages (use my.switchTab instead)
  • Query parameter values should be URL-encoded if they contain special characters
  • The current page is preserved and can be returned to with my.navigateBack

Differences from Other Navigation APIs

my.navigateBack

Go back to previous page

my.redirectTo

Replace current page