3

I would like to be able to fully reload by Angular2 app because something has changed in the data. I could do that in AngularJS through $route.reload() (or even $state.go($state.current.name, $state.params, {reload: true})), but I can't find an equivalent now.

I know there's Router.renavigate(), but that doesn't seem to do much. Is it supposed to do what I'm asking for? Is there another way?

user3221325
  • 621
  • 1
  • 7
  • 10

1 Answers1

1

I think I have figured this out. router.renavigate() will throw away the Component and rebuild it if the Component implements CanReuse (from 'angular/router') and returns false from the canReuse() method it overrides.

This works for me as of alpha 42.

user3221325
  • 621
  • 1
  • 7
  • 10