How to have a dynamic menu?

By default it is not possible to have dynamic menu.

First aim of AppDeck is a perfect user experience as close as possible as a native app.

So far we manage to do this without putting too many rules or limitation on the developer side ... except one: menu must be cached and menu’s HTML is embed in application at compilation time.


Because an application MUST ALWAYS be up and running, even if your server is down, network is down or slow, or in case of partially downloaded file.

So we force menu to be cached and we embed menu HTML content at compilation time.

This way even if your users launch your application for the first time with no network, your application is up.
For dynamic menu needs, work around is to make ajax query to refresh part of it on demand or even use message API from on page to another to ask for update.


In your menu:

Configure your menu to handle content loading on it's own.

in HEAD:

Use message API to receive command from other page (or from menu itself):

JavaScript Code:

In your page:

Ask menu to load any page.