We have a nested structure were we want to change the layout of the page based on a query param, so for this we have 2 components that will be displayed based on matcher , here is the stackblitz https://stackblitz.com/edit/angular-5bnobf?file=src%2Fapp%2Fmain%2Fmain%2Fmain.component.html,src%2Fapp%2Fmain%2Fmain%2Fmain.component.ts,src%2Fapp%2Fmain%2Fmain%2Fmain.component.css,src%2Fapp%2Fmain%2Fmain-routing.module.ts,src%2Fapp%2Flazy-loading%2Flazy-loading-routing.module.ts,src%2Fapp%2Flazy-loading%2Flazy-loading%2Flazy-loading.component.html,src%2Fapp%2Flazy-loading%2Flist%2Flist.component.ts,src%2Fapp%2Fmain%2Fmain.module.ts,src%2Fapp%2Ftab-1%2Ftab-1-routing.module.ts,src%2Fapp%2Ftab-1%2Ftab-1.module.ts,src%2Fapp%2Ftab-1%2Ftab-1%2Ftab-1.component.css,src%2Fapp%2Ftab-1%2Ftab-1%2Ftab-1.component.html
#Matcher works only after navigating to the same route at least once.
4 messages · Page 1 of 1 (latest)
Why don't you simply assign a dumb component to your component-1 path, responsible of displaying grid or list based on the queryParams it receives?
Also Tab1Component can decide which component to be displayed based on queryParams but I want to find a better solution to this