Componentless routes
Most of the routes in the configuration have either the redirectTo
or component properties set, but some have neither. For instance, look at
path: ':folder'
route in the configuration below:
{ path: ':folder', children: [ { path: '', component: ConversationsCmp }, { path: ':id', component: ConversationCmp, children: [ { path: 'messages', component: MessagesCmp }, { path: 'messages/:id', component: MessageCmp } ] } ] }
We called such routes componentless routes. Their main purpose is to consume URL segments, provide some data to its children, and do it without instantiating any components.
The parameters captured by a componentless route will be merged into their children's parameters. The data resolved by a componentless route will be merged as well. In this example, both the child routes will have the folder parameter...