How can I combine these to observables into one? They have the same functionality.
this.sub = this.route.params.subscribe((params: any) => {
// functionality
});
this.sub = this.route.queryParams.subscribe((params: any) => {
// same functionality
});
You can use combineLatest to do that:
params and qparams will be objects with the property name as the param name and the value as the value. So for a route:
with params
allParams will be