How do I set/read a query string when using the router in aurelia?

前端 未结 3 1696
时光说笑
时光说笑 2021-02-05 16:35

When using the aurelia.io framework router, what is the preferred method for reading and setting a query string?

For example, in the url: http://www.myapp.com/#/my

3条回答
  •  死守一世寂寞
    2021-02-05 17:16

    As per the latest configuration, the query string will not be retrieved if you didn't set the push state.

    Set push state to true. and add base tag in index.html.

    - index.html

    config.options.pushState = true; - app.js -> configureRouter method.

提交回复
热议问题