Hi Everyone,
How to modify the loading screen that comes while loading the api in routes when we use ON.
i have modified inside the sdk itself but when we share our build we don’t share the node_modules.
Is there any way to modify it from the front ?
Hi @anandpatel4, could you please share more context or a code snipper of your router config to get more information as to what you’re attempting to do?
The on data provider shows the Loader, performs the data request, hides the Loader and displays the new page. For example:
{
path: 'player/:playlistId/:assetId',
// page instance and dynamic url data
// will be available in the callback
on: (page, {playlistId, assetId}) => {
return new Promise((resolve, reject)=>{
// do a request
doRequest.then((lists)=>{
// set property on the page
page.lists = list
resolve()
}).catch((e)=>{
reject(e)
})
})
},
// time in seconds
cache: 60 * 10 // 10 minutes
}
If you navigate to: localhost:8080/#player/267/173688 via Router.navigate('player/267/173688'); , the Router performs the following subsequent actions:
Hide the current page (and destroy it to free up memory, if so configured)
Show a Loading Component (optional)
Wait for the data provider’s request to resolve
Show the new page attached to the route
While using ON, a Loading Component comes I want to modify that component