Currently, I am utilizing @ngrx/effects along with @angular/router in my Angular 2 project (version RC4).
Upon adding the line private router: Router
within the effects:
@Injectable()
export class RouterEffects {
constructor(
private updates$: StateUpdates<AppState>,
private router: Router // <- this line
) {}
}
An error is triggered and it reads as follows:
EXCEPTION: Cannot instantiate cyclic dependency! (Token Application Initializer -> Token @ngrx/effects Bootstrap Effects -> Router -> ApplicationRef -> ApplicationRef_)
I am seeking a solution to resolve this issue. Thank you for any assistance.