my.showNavigationBarLoading().
Parameters
This API does not require any parameters.Code Example
Basic Usage
Complete Loading Pattern
Related APIs
my.showNavigationBarLoading
Show the loading indicator
my.hideLoading
Hide fullscreen loading
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Hide the loading animation in the navigation bar.
my.showNavigationBarLoading().
my.hideNavigationBarLoading();
Page({
loadData() {
my.showNavigationBarLoading();
my.request({
url: 'https://api.example.com/data',
success: (res) => {
this.setData({ data: res.data });
},
complete: () => {
// Always hide loading, whether success or failure
my.hideNavigationBarLoading();
}
});
}
});