In router-lite it is possible to pass an unconfigured and optional parameter like:
this.router.load({
component: 'product-id',
params: { id: 'product-1', optionalParam: 'test132' },
});
The optional param is provided by the params object, but cannot be read from there:
loading(params: Params, next: RouteNode) {
this.id = params.id;
// this.optionalParam = params.optionalParam; <- this is not working
this.optionalParam = next.queryParams.get('optionalParam');
}
Is this by design or could this be simplified?