T
Import Injector
import {Injector} from @angular/core
Reference it in the constructor:
constructor(private injector:Injector) {}
Create a method to get the router like this:
getRouter() {
if(!this.router) {
this.router = this.injector.get(Router);
}
return this.router;
}
Then in the effects you can invoke it like this:
this.getRouter().navigate(['App', 'Index']);
This is an ugly way to make it work, but it does the job.
вот так?