The Angular Material Documentation application retrieves route parameters from lazy loaded route modules like this:
// Combine params from all of the path into a single object.
this.params = combineLatest(
this._route.pathFromRoot.map(route => route.params), Object.assign);
It seems like we don't really need combineLatest for this?
The _route is constructor injected and IIUC once the component has the reference to it the pathFromRoot array of ActivateRoute instance cannot change?
Since that's the case we don't need combineLatest?
So it seems like we could do something like this instead:
const paramArr = this._route.pathFromRoot.map(route => route.params)
this.params = of(Object.assign(paramArr))
Does this make sense?