Problem getting property from router URL

My code in routes.js is:

  {
    path: '/order/:order_id',
    xhrCache: false,
    on: {
      pageBeforeIn: function (event, page) {
        app.progressbar.show('multi');
      },
      pageAfterIn: function (event, page) {
        app.progressbar.hide();
      },
      pageMounted: function (event, page) {
      },
    },
    async: function ({ app, to, resolve }) {
      console.log(app.props.order_id);
      fetch('http://localhost/app/pages/order_info.html?order_id={{order_id}}')
        .then((res) => res.text())
        .then(function (data) {
          resolve(
            {
              component: app.component.parse(data),
            }
          )
        })
        .catch (function (error) {
          resolve(
            {
              content: errorLoader,
            },
          )
        })
    },
  },

I need pass “order_id” in url of the fetch function, like this:

fetch('http://localhost/app/pages/order_info.html?order_id=**123**')

But order_id is not being passed to the fetch URL.

I’m stuck with this and haven’t found any way to resolve it.

Someone can help me?

I resolved this! I can get the “order_id” with:

to.params.order_id

I can’t believe I wasted the day with this. :confused:

It is recorded in case anyone needs it.