const routes: Routes = [
{
path: 'with-breadcrumbs',
component: PostsIndexComponent,
data: operate(
reset(all),
getMany(posts),
staticBreadcrumb({ title: 'all posts' }),
staticMeta({ title: 'All posts ' }),
),
children: [{
path: ':id',
component: PostsShowComponent,
data: operate(
getActive(posts),
activeBreadcrumb(posts, {
factory: data => ({ title: `#${data.id} ${data.title}` }),
}),
activeMeta(posts, {
factory: data => ({ title: `#${data.id} ${data.title}` }),
}),
),
}],
},
];