WeChat Open Platform

Mini Programs Documentation

Set Navigation Bar

wx.setNavigationBarTitle(OBJECT)

Dynamically sets the title of the current page.

OBJECT parameter descriptions:

Parameter Type Required Description
title String Yes Page title
success Function No Callback function for successful interface call
fail Function No Callback function for failed interface call
complete Function No Callback function for interface call results (will be executed if call succeeds or fails)

Sample code:

wx.setNavigationBarTitle({
  title: 'Current page'
})

wx.showNavigationBarLoading()

Displays navigation bar loading animation on current page.

wx.hideNavigationBarLoading()

Hides navigation bar loading animation.