While debugging in chrome, I came across this object:
this.activeRoute.queryParams._value
The constructor passes activeRoute
as
private activeRoute: ActivatedRoute
Interestingly, when I'm in vs code and type this.activeRoute.queryParams
, ._value
does not appear as an available object. Is there a way to access that object?
Here is the code snippet that I eventually used.
this.activeRoute.queryParams.subscribe((params: Params) => {
let context = params['context'];
this.context = context;
});
Also, remember to include Params in the import statement.
import {Router, ActivatedRoute, Params} from '@angular/router';