[ X] bug report => Search github for a similar issue or PR before submitting
Plunkr Case (Bug Reports)
It's not a working plunkr, but you can see the code
https://plnkr.co/edit/d6BSgRYbBzk7r4NB4bwy?p=info
Current behavior
When you set a routerlink to a child menuItem, this is not redirecting to any component. However, when a parent menuItem has a RouterLink, this can redirect to a component
Expected behavior
when a child of menuItem has RouterLink, it should redirect to a component.
Minimal reproduction of the problem with instructions
this.itemsPrueba = [
{
label: 'Articles',
icon: 'fa-edit',
items: [
{label: 'Articles Gamma', icon: 'fa fa-dot-circle-o fa-fw', routerLink: ['/index/articles']},
]
},
];
<p-panelMenu [model]="itemsPrueba" ></p-panelMenu>
For more details, go to the plunkr
What is the motivation / use case for changing the behavior?
In Angular 2.x.x and primeNG 2.0.5 was working right,
Please tell us about your environment:
OS: Ubuntu 16.04
IDE: Eclipse Neon
package manager: npm 3.10.9
typescript 2.2.2
Angular version: 2.0.X
Angular version: 4.0.0 & 4.0.1 (its not working with no one of those)
PrimeNG version: 2.0.X
PrimeNG version:** 4.0.0-rc.2
Browser: [all ]
Language: [all]
I experience probably the same issue with
The same issue here, using angular 4.0.0-rc2 the routerLink redirection does not working
Same here using angular 4.0.1 and primeng 4.0.0-rc.2.
The link is incorrect. It has href="#".
This change is the issue:
issue
The same issue with MenuBar used to work fine and stopped working after updating, links shows "/#" no errors in console.
@xyz765 Same for me.
I got the same Issue but only on the SubMenuItems. The routerLink on a top Level MenuItem works just fine.
got the same bug. Is there any workaround for now?
Use rc.1
@kcsahoo i'm sorry, can you explain? this is my first pull request ever.
In your application you have to use Primeng V4.0.0-rc.1 with Angulat V4.0.1
I have tested.
All features work.
I hope Primeng team will resolve this issue in next rc version and rtm version
Also have this bug. routerlink just seems to not be getting set at all
I have the same problem
same bug. routerLink is not correctly set. Primeng v4.0.0-rc.1 works with Angular 4.0.2.
And here with PrimeNG v4.0.0-rc3 and Angular 4.0.3
My code is;
{ label: 'Filesystem', routerLink: ['/filesystemrepository'] },
{ label: 'AWS', url: 'http://www.primefaces.org/primeng' },
The AWS menu item works fine. the Filesystem one is rendered with href="#"
No errors in console either.
Can you try with 4.0 final?
Duplicate of https://github.com/primefaces/primeng/issues/2522
Still happening for me in 4.0.0 final using angular 4.1
https://plnkr.co/edit/KlPzhzvFzXfTqL82SIzy?p=preview
Notice that the href is rendered as href="#"
(primeng seems to be down atm for plunker)
I can't replicate the issue.It works good in latest version. Please try on latest version. Currently the issue exists for TieredMenu only.
Is there a filed issue for TieredMenu?
Yes, it was filed here https://github.com/primefaces/primeng/issues/2763 . The child reference variable should be used instead item variable which doesn't exist.Shall I raise the PR?
Most helpful comment
The same issue here, using angular 4.0.0-rc2 the routerLink redirection does not working