Eg: In view agreement List and create agreement in same page. i want to reload the agreement List after save the new agreement.i try this this.router.navigate('/agreement/client/10') but this is not load the new list because the it's navigating the same url.
Asked
Active
Viewed 981 times
0
-
Possible duplicate of [Reload current page in Aurelia](https://stackoverflow.com/questions/38845637/reload-current-page-in-aurelia) – adiga Oct 16 '17 at 19:33
2 Answers
1
In your configureRouter
method, add activationStrategy.replace
to routes that need this functionality:
import {activationStrategy} from 'aurelia-router';
export class MyClass {
configureRouter(config) {
config.map([{
route: 'my-route',
name: 'my-name',
activationStrategy: activationStrategy.replace,
title: 'My Title',
moduleId: 'myModule',
}]);
}
}

Jeff G
- 1,996
- 1
- 13
- 22
-
thanks. this solution is working fine. when i try to save one agreement this is working. when i change again that agreement this is not working. any solution for this??? – PANCHALINGAM KUMANAN Oct 24 '17 at 16:13
0
You can use the Event Aggregator, and publish an event when you add a new agreement, and reload the list when the event is triggered.

Valentin B.
- 255
- 2
- 8