Skip to content

michaelbromley/ngx-pagination with ivy #31540

Closed

Description

@hadley8899

🐞 bug report

Affected Package

@angular 8.0.0 and 8.1.0 with ivy

Is this a regression?

Works fine without ivy

Description

When Ivy is enabled the package michaelbromley/ngx-pagination no longer works. It produces a console error as seen in the Exception or Error section

🔬 Minimal Reproduction

https://stackblitz.com/edit/angular-1nyivw

The project is setup here but IVY doesn't seem to work on stackblitz (It just doesn't detect the tsconfig)

The repo for this is here

https://github.com/hadley8899/angular-ngx-pagination-ivy-issue

🔥 Exception or Error

core.js:9110 ERROR Error: Export of name 'paginationApi' not found! at cacheMatchingLocalNames (core.js:15418) at resolveDirectives (core.js:15191) at createDirectivesAndLocals (core.js:14609) at ɵɵelementStart (core.js:19505) at PaginationControlsComponent_Template (template.html:2) at executeTemplate (core.js:14533) at checkView (core.js:15957) at componentRefresh (core.js:15715) at refreshChildComponents (core.js:14214) at refreshDescendantViews (core.js:14120)

🌍 Your Environment

Angular Version:



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 8.1.1
Node: 10.15.3
OS: win32 x64
Angular: 8.1.1
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.801.1
@angular-devkit/build-angular     0.801.1
@angular-devkit/build-optimizer   0.801.1
@angular-devkit/build-webpack     0.801.1
@angular-devkit/core              8.1.1
@angular-devkit/schematics        8.1.1
@ngtools/webpack                  8.1.1
@schematics/angular               8.1.1
@schematics/update                0.801.1
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.35.2

Activity

  1. JoostK commented on Jul 13, 2019

    @JoostK
    Member

    Hi @hadley8899,

    thank you for reporting! I had a quick go with your reproduction repo and even after upgrading to 8.2.0-next.1 I am able to reproduce. At first glance, only the NgxPaginationModule module from ngx-pagination is processed by ngcc, none of its components are processed and therefore not prepared for Ivy. So this does look like an issue in ngcc that we need to look into. Thanks again for reporting!

  2. added this to the Backlog milestone on Jul 13, 2019
  3. self-assigned this
    on Jul 13, 2019
  4. JoostK commented on Jul 13, 2019

    @JoostK
    Member

    ngcc is not dealing with the suffixed names like __decorate$1 and __metadata$1 correctly, which causes the package to be processed only partially. With a small fix to ngcc we can get it to work :)

    Screenshot 2019-07-13 at 12 28 34

    I will work on a PR later this week.

  5. hadley8899 commented on Jul 13, 2019

    @hadley8899
    Author

    Awesome, that is great news :)

  6. haucongle commented on Aug 14, 2019

    @haucongle

    I use Angular 8.2.1 and this problem is still happening. Did you fix this?

  7. JoostK commented on Aug 14, 2019

    @JoostK
    Member

    @haucongle Please use 9.0.0-next.2 for the Ivy preview.

  8. added a commit that references this issue on Sep 6, 2019
    44fc470
  9. angular-automatic-lock-bot commented on Sep 15, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  10. locked and limited conversation to collaborators on Sep 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions