Why Can't I Inject RouterStateSnapshot into Login Component in Angular 2 App?
I think you can get the RouterStateSnapshot
from the RouterState
. Consider this example:
constructor(private router: Router) {
let routerStateSnapshot = this.router.routerState.snapshot;
}