主题
RouteUrlStrategy 继承自: Enum
控制 Web 应用的路由在浏览器 URL 中如何呈现。
可与 run 或 run_async 的 route_url_strategy 参数配合使用。
注意: 该设置仅对托管在 Web 上的应用生效。
枚举值
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
PATH | — | 'path' | 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. |
HASH | — | 'hash' | 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. |