Represent the Flow State in the URL
There are two strategies for the router to represent the state in the URL: query
and path
.
- query (default): the current page path is stored in the URL using a query parameter like this:
http://myApp/?page=app&app=main
- path: the current page path is stored in the URL using a path segment like this:
Notice the markerhttp://myApp/vp/app/main
vp
added to the URL. It is needed in order for Visual Builder to recognize where the path to the current page starts.
To change the strategy, use the routerStrategy
property in app-flow.json
:
{
"applicationModelVersion": "18.1.5",
"id": "flowDemo",
...
"routerStrategy": "path"
}
When using the path
router strategy, the server where the application is deployed needs to be able to handle these URLs in a special way to ensure that browser refreshes and bookmarks work properly.