bergben / ng2-page-transition

Simple Angular2 component to create a page transition animation on route changes
MIT License
41 stars 7 forks source link

Getting "Unexpected Module" with latest 1.0.4 version and latest TypeScript compiler #7

Closed FastAndFluid closed 7 years ago

FastAndFluid commented 7 years ago

Upgraded to new "Module" suffixed version of ng2-page-transition but now getting "Unexpected module" error. Searching on this error this looks like some tightening of rules on the latest TypeScript version which I also updated at the same time (running v2.2.1 after upgrading from v2.0.10)

bergben commented 7 years ago

@FastAndFluid are you sure this is because of ng2-page-transition?

Make sure you don't declare the Ng2PageTransitionModule in declarations like you did the component before 1.0, you need to import it in imports.

Seems to work fine for me with 2.2.1 TS and 1.0.4...

FastAndFluid commented 7 years ago

You are correct. the mistake was mine in not moving the new declaration to the imports section. Sorry for the confusion.

bergben commented 7 years ago

No worries @FastAndFluid , glad to hear the issue is solved.