1

This is the below code I am using while doing refresh the route

export default class MyController extend Controller {
    @service router;

    @action refresh() {
         this.router.refresh()
    }
}

While calling this.router.refresh() it throws like refresh function not present.

Mari Selvan
  • 3,598
  • 3
  • 21
  • 36
  • The RFC has been merged recently https://github.com/emberjs/rfcs/pull/631 and I don't think it's landed in a version yet. This might help: https://github.com/emberjs/rfcs/issues/629#issuecomment-631820472 – Gokul Kathirvel Dec 30 '20 at 05:36

1 Answers1

1

The RouterService does not have a refresh method yet. An RFC to add one was merged in October 2020 but has not been implemented yet.

This hasn't changed with Ember Octane. The RouterService never had a refresh method yet. Maybe you meant the refresh method of Route? This one exists both in Octane as well as before.

jelhan
  • 6,149
  • 1
  • 19
  • 35