Skip to main content
Version: v3

push

Start from API_LEVEL 2.0 . Please refer to API_LEVEL.

Navigate to a page within the Mini Program. Use the back method to go back to the original page.

Type

function push(option: Option): void

Parameters

Option

PropertyTypeRequiredDefaultValueDescriptionAPI_LEVEL
urlstringY-path2.0
paramsstring|objectN-Parameters passed to the page onInit lifecycle, supporting strings or standard JSON object. If a standard JSON object is passed, the method internally converts it to a string2.0

Example

import { push } from '@zos/router'

push({
url: 'page/index',
params: 'type=1',
})