Using @angular/router-deprecated instead of @angular/router is causing issues in several components
Components which are going to have problems:
- breadcrumb
- contextmenu
- megamenu
- menu
- menubar
- panelmenu
- slidemenu
- tabmenu
- tieredmenu
Is there a way to used these components with new @angular/router?
same problem with autocomplete which is what i really need in my current project.
A quick fix (temporary solution) is to provide also deprecated router:
in package.json you need both:
- "@angular/router": "^2.0.0-rc.1"
- "@angular/router-deprecated": "^2.0.0-rc.1"
in bootstrap file you do it like this:
- import { ROUTER_PROVIDERS } from '@angular/router'
- import { ROUTER_PROVIDERS as ROUTER_PROVIDERS_D} from '@angular/router-deprecated'
bootstrap(AppComponent, [ //build in providers HTTP_PROVIDERS, ROUTER_PROVIDERS, ROUTER_PROVIDERS_D, //app injectables APP_ACTIONS, provideStore(APP_REDUCERS), instrumentStore(), provide(AppStateStore, {useExisting:Store}), devtoolsConfig({ position: 'bottom', visible: true, size: 0.3 }) ]) .catch(err => console.error(err));
Same issue. Please upgrade to RC1 and remove @angular/router-deprecated dependency.
Experienced the same issue, workaround from joe380 did solve the problem for the moment.
Same issue. @joe380 Thanks for the workaround .
However, I'm using Contextmenu so when I right click, the position for menu seems to be off. It's open a bit far right and bottom. Like If I right click on first row 5th column, it open up in 2nd row and far right (see image below). Any thoughts?

+1. Mixing the use of the deprecated router with the current one (used by my apps outside of PrimeNG) is really not a fun problem to deal with.
After the new update to v.1.0.0-beta.7 (https://github.com/primefaces/primeng/issues/388) , this issue is resolved. Thanks primeng team.
Closing as tomorrow's beta9 even use the new new new router of RC3.