Route Data
Introduction
Section titled “Introduction”Route data allows passing static configuration to components through the route definition.
Example
Section titled “Example”{ path: 'products', component: ProductListComponent, data: { title: 'Products', roles: ['admin', 'user'] }}
// Componentthis.route.snapshot.data['title'];Summary
Section titled “Summary”Route data provides a clean way to pass configuration to routed components.”