When debugging in chrome I can see this object:
this.activeRoute.queryParams._value
activeRoute is passed in my constructor as
private activeRoute: ActivatedRoute
When I'm in vs code and type this.activeRoute.queryParams, ._value isn't an available object. Is there a away to access that object?
Just wanted to post the code I ended up using.
this.activeRoute.queryParams.subscribe((params: Params) => {
let context = params['context'];
this.context = context;
});
also don't forget to add Params to the import statement
import {Router, ActivatedRoute, Params} from '@angular/router';
_valueis a private member ofqueryParams- only the class itself can access it. Since JavaScript has no notion of private or public scope you could technically access the member in your code however TypeScript will not allow you to compile it, so it won't work.