1

Is there a reload/refresh or like the Angular 2 version a renavigate method for the now deprecated (but much too late for the current project already built on it) component router for AngularJS 1.5?

Currently in order to destroy the route components and reload them I had to create a dumby route at the same level that I switch to and then back in order to force the components to be destroyed and then be rebuilt due to the view being composed of dynamic form fields.

I'd also be interested in any other suggestions if no API call exists to refresh a route.

Community
  • 1
  • 1
mtpultz
  • 17,267
  • 22
  • 122
  • 201

1 Answers1

0

The answer was to use $routerCanReuse and explicitly return false (since we don't have any other logic to apply), which when you reroute to the same route will now destroy and recreate the components allow for the dynamic forms to be re-rendered.

mtpultz
  • 17,267
  • 22
  • 122
  • 201