my.navigateTo, the current page is removed from the page stack, so users cannot navigate back to it.
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
| url | String | Yes | Page path with optional query parameters (format: path?key=value) |
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
Code Example
Basic Usage
With Query Parameters
With Callbacks
Use Cases
Replace Login Page After Success
Replace Login Page After Success
Wizard Flow
Wizard Flow
Error to Home Redirect
Error to Home Redirect
Important Notes
Differences from Other Navigation APIs
| API | Current Page | Can Go Back |
|---|---|---|
my.navigateTo | Kept in stack | Yes |
my.redirectTo | Closed | No |
my.reLaunch | All pages closed | No |
Related APIs
my.navigateTo
Navigate keeping current page
my.reLaunch
Close all and open new page