Query params and fragment
In opposite to other observables, that are scoped to a particular route, query parameters and fragment are shared across multiple routes.
@Component({...})
class MessageCmp {
debug: Observable <string>;
fragment: Observable <string>;
constructor(route: ActivatedRoute) {
this.debug = route.queryParams.map(p => p.debug);
this.fragment = route.fragment;
}
}