Open dolzenko opened 9 years ago
I'd also like to know how to accomplish this. My initial page loads based on a REST call. If the user adds a search term via another part of the page I'd like to redo the REST call and reload the ngViewport. I've figured out everything except the reload part.
+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.
Classic router allowed to reinstantiate the controller with [0], how the same can be achieved with new router?
[0] https://docs.angularjs.org/api/ngRoute/service/$route#reload