# \[Aurelia 2\] Reload current route (router-lite)

**URL:** <https://discourse.aurelia.io/t/aurelia-2-reload-current-route-router-lite/6354>\
**Category:** Help Requests\
**Created:** [February 12, 2025, 1:01pm UTC](https://discourse.aurelia.io/t/aurelia-2-reload-current-route-router-lite/6354 "2025-02-12T13:01:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![graycrow](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/graycrow/32/323_2.png) [@graycrow](https://discourse.aurelia.io/u/graycrow)\
**Post date:** [February 12, 2025, 1:01pm UTC](https://discourse.aurelia.io/t/aurelia-2-reload-current-route-router-lite/6354/1 "2025-02-12T13:01:21Z")

</div>

Sometimes I need to completely re-render a page (to go around quirks of other framework). In Aurelia 1 this was easy:

```auto
this.router.navigateToRoute(
                        this.router.currentInstruction.config.name,
                        this.router.currentInstruction.params,
                        {
                            replace: true,
                        }
                    );

```

Now, no matter how I try, I can’t find the way to make it work. Documentation is scarce (this topic is only described for the full router, not lite), LLMs keep advising using methods and properties that never existed or have already been replaced/removed.

---

<div class="post-metadata">

**Author:** ![Sayan751](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/sayan751/32/1861_2.png) [@Sayan751](https://discourse.aurelia.io/u/Sayan751)\
**Post date:** [February 12, 2025, 6:18pm UTC](https://discourse.aurelia.io/t/aurelia-2-reload-current-route-router-lite/6354/2 "2025-02-12T18:18:51Z")

</div>

Hi @graycrow! Have you already tried the `transitionPlan: 'replace'` navigation options? It is documented in [Navigating | The Aurelia 2 Docs](https://docs.aurelia.io/getting-to-know-aurelia/routing/aurelia-router-lite/navigating#using-navigation-options) (search for `transitionPlan`). For more info on `transitionPlan` refere this documentation: [Transition plan | The Aurelia 2 Docs](https://docs.aurelia.io/getting-to-know-aurelia/routing/aurelia-router-lite/transition-plans).

---

<div class="post-metadata">

**Author:** ![graycrow](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/graycrow/32/323_2.png) [@graycrow](https://discourse.aurelia.io/u/graycrow)\
**Post date:** [February 13, 2025, 7:49am UTC](https://discourse.aurelia.io/t/aurelia-2-reload-current-route-router-lite/6354/3 "2025-02-13T07:49:10Z")

</div>

> [@Sayan751](#):
>
> transitionPlan: ‘replace’

Yes, I know about this parameter, thank you. My problem is that I cannot find a good way to find a current route details/parameters to know where to navigate to. This method is in the base class for all pages and I want it to be “self-containing”, without passing parameters to it and then reconstructing that navigation (or whatever name it is) object. There is always window.location, but it’s an “ugly” way, I think. I started to rewrite everything again to full router, because it looks like it has more “traditional” way of accessing the current route and it’s documented, but then I found that it lacks NavigationModel, which router-lite has and the original aurelia-router has as well. Now I’m stuck because I don’t know which way to take - keep digging router-lite and hope I will find something useful deep inside or drop it in favor of full router and then replace/recreate missing NavigationModel.

---

<div class="post-metadata">

**Author:** ![graycrow](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/graycrow/32/323_2.png) [@graycrow](https://discourse.aurelia.io/u/graycrow)\
**Post date:** [February 13, 2025, 11:21am UTC](https://discourse.aurelia.io/t/aurelia-2-reload-current-route-router-lite/6354/4 "2025-02-13T11:21:01Z")

</div>

Ok, it looks like the direct replacement for the simple v1 code listed above is this:

```auto
this.router.load(
      {
        component: (
          this.router.currentTr.finalInstructions.children[0].recognizedRoute
            .route.endpoint.route.handler as any
        ).id,
        params:
          this.router.currentTr.finalInstructions.children[0].recognizedRoute
            .route.params,
        transitionPlan: 'replace',
      },
      {
        historyStrategy: 'replace',
        context: null // ???,
      }
    );

```

It requires some type conversion to `any` (because of missing types), but gets the correct id and parameters, but still doesn’t reload the page. Having read a lot about router-lite in the last few days, I suspect it’s because of missing context, but I have no idea what to put there, `this` throws an error.

---

<div class="post-metadata">

**Author:** ![Sayan751](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/sayan751/32/1861_2.png) [@Sayan751](https://discourse.aurelia.io/u/Sayan751)\
**Post date:** [February 13, 2025, 5:12pm UTC](https://discourse.aurelia.io/t/aurelia-2-reload-current-route-router-lite/6354/5 "2025-02-13T17:12:54Z")

</div>

I think you can leave out setting the `context`. As far as I can remember, that would search for the routes configured under the root component. Specifying a context always means navigating relative to that context (example: child routes).

Also, if you want to, in this scenario, always want to navigate to the currently loaded component, you might consider using the custom element definition from of the injected custom element controller.

```ts
public readonly $controller: ICustomElementController<this>;

```

You can put the `$controller` property always in a custom element, and Aurelia will always set this to the controller instance. Then you can set `this.$controller.definition` to the `component`.

If this doesn’t resolve your problem, please consider sharing a reproduction.
