_getHeaderMenu
How to Use _getHeaderMenu
Method
_getHeaderMenu
method is used to retrieve the main header menu of the application. It leverages caching and local storage to optimize performance, reducing the need for repeated API requests. This method is ideal for loading navigation menus that are frequently accessed by users.Usage Steps:
1.
2.
callback
function is passed as a parameter. This function will be executed once the header menu is retrieved. The retrieved menu data will be passed as an argument to this function.3.
Example:
handleHeaderMenu
function will be executed once the header menu is retrieved, allowing you to process and display the menu data as needed.Common Use Cases:
1.
2.
3.
Notes:
_cache_main_menu
) and in local storage to improve performance. If the cache is available, it will be used instead of making an API call.