Primeng: ConfirmationService can't be imported with Angular 9

Created on 13 Feb 2020  路  2Comments  路  Source: primefaces/primeng

primeng version : 9.0.0-rc.4
Angular version: 9.0.1

With previous version, we imported the service like this :

`import { ConfirmationService } from 'primeng/components/common/confirmationservice';

`
we changed it to :

`import { ConfirmationService } from 'primeng/api/confirmationservice';`

But this gives us the following error :

  `Module not found: Error: Can't resolve 'primeng/api/confirmationservice'`

How do we use ConfirmationService with the new version ?

Note that this code works when using Angular 9 + primeng 8 + disabling Ivy

Most helpful comment

Try to import ConfirmationService like this:

import { ConfirmationService } from 'primeng/api';

Works for me with

Angular 9.0.1
PrimeNG 9.0.0-rc.4

Regards

Michael

All 2 comments

Try to import ConfirmationService like this:

import { ConfirmationService } from 'primeng/api';

Works for me with

Angular 9.0.1
PrimeNG 9.0.0-rc.4

Regards

Michael

Please use forum for questions and help requests.

Was this page helpful?
0 / 5 - 0 ratings