I'm submitting a ...
[ ] bug report
[ ] feature request
[x] question about the decisions made in the repository
Do you want to request a feature or report a bug?
Request a feature
What is the current behavior?
Add all routes to page.menu.ts in order to change the page title.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
Not bug
What is the expected behavior?
Set the pageTitle in *.routing.ts and let BaContentTop subscribe to the event when route changed.
Once the route changed, it can get the page title from BaContentTop and set it.
What is the motivation / use case for changing the behavior?
Not all pages we need to display in the side menu. Eg: create or edit a new resource, some pages should access from its parent page.
Please tell us about your environment:
Angular version: 2.2.3
Browser: all
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
no
You can already do this in the pages.menu, for any page that you don't want to display in the menu, but still want to display the breadcrumbs, page.title.
{
path: 'COMPONENT_NAME', // path for our page
data: { // custom menu declaration
menu: {
title: 'PAGE_TITLE',
pathMatch: 'prefix',
hidden: true
}
}
},
Won't show up in the menu, but will still display the title, breadcrumb.
@Bengejd, yep, exactly!
thank you
Hi,
I would like to add to breadcrumb also the router dynamic pathparam...
example home/PAGE_TITLE/1
where the number is the :id of dynamic route path.
is there a way to do it?
@gjsbe
I'm currently working on this, will update you when I come up with a solution.
@Bengejd any updates for this feature? =D
looking forward to it!
i hope #1163 can help
example menu.item:
children: [
{
path: 'user',
data: {
menu: {
title: 'user.title',
pathMatch: 'prefix',
hidden: true,
showingParent: true,
},
},
},
Most helpful comment
@gjsbe
I'm currently working on this, will update you when I come up with a solution.