primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Using @angular/router-deprecated instead of @angular/router is causing issues in several components

Open joe380 opened this issue 10 years ago • 8 comments

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?

joe380 avatar May 18 '16 10:05 joe380

same problem with autocomplete which is what i really need in my current project.

robert-king avatar May 19 '16 02:05 robert-king

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));

joe380 avatar May 19 '16 06:05 joe380

Same issue. Please upgrade to RC1 and remove @angular/router-deprecated dependency.

ajayambre avatar May 19 '16 07:05 ajayambre

Experienced the same issue, workaround from joe380 did solve the problem for the moment.

wernerjacobs avatar May 20 '16 11:05 wernerjacobs

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?

screen

ammar91 avatar May 20 '16 13:05 ammar91

+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.

brian428 avatar May 20 '16 16:05 brian428

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.

IsuruCham avatar May 30 '16 11:05 IsuruCham

Closing as tomorrow's beta9 even use the new new new router of RC3.

cagataycivici avatar Jun 28 '16 20:06 cagataycivici