Dynamic Content in V6

What is equivalent to router.loadContent function in V6? I’m migrating from V1 to V6 and I can’t find equivalent way to load dynamic content. It’s not possible for me to predefine routes since there can be 1m+ potential combination so I need to be able to load them based on conditions.

Any pointers? I saw that there is a content option and I tried it with router.navigate, but that doesn’t work and I’m very confused with the documentation.

I tried the following and it didn’t work:

     name: name,
     url: url,
     content: content

     name: name

There is no alternative, you can try to create the dynamic route and use async method to fetch the content:

  path: '/something/:filename',
  async({to, resolve}) {
    console.log(to.params.filename) // should contain dynamic property
    // load somehow the content
    fetch('somepath' + filename).then((res) => res.text()).then((content) => {
      // resolve route with loaded content

Thanks. How do I keep adding new route since I won’t know them up front? I assumed I should not add it directly into the array, right?