Skip to main content
Version: v2

launchApp

Start from API_LEVEL 2.0 . Please refer to API_LEVEL.

Open Mini Program.

Type

function launchApp(option: Option): void

Parameters

Option

PropertyTypeRequiredDefaultValueDescriptionAPI_LEVEL
appIdnumberY-Mini Program ID2.0
urlstringY-path2.0
paramsstring|objectN-The argument passed to the app.js lifecycle onCreate supports either a string or a standard JSON object. If a standard JSON object is passed, the method internally converts it to a string2.0

Example

import { launchApp } from '@zos/router'

launchApp({
appId: 1000001,
url: 'pages/js_widget_sample',
params: {
type: 1,
},
})