Skip to main content

RouteUrlStrategy

Controls how routes are represented in the browser URL for web apps.

Use this with the route_url_strategy argument of run or run_async.

Note

This setting affects web-hosted apps only.

Inherits: enum.Enum

Properties

  • HASH - Stores routes in the URL fragment after #.
  • PATH - Stores routes in the browser pathname.

Properties

HASHclass-attributeinstance-attribute

Stores routes in the URL fragment after #.

URLs look like https://example.com/#/store.

This strategy is useful when you cannot configure the hosting server for pathname-based routing.

PATHclass-attributeinstance-attribute

Stores routes in the browser pathname.

URLs look like https://example.com/store.

Note

This strategy usually requires the web server to rewrite unmatched requests to index.html so deep links and page reloads continue to work.