jmandreslopez / ng2-odometer

Odometer for Angular2
MIT License
23 stars 18 forks source link

ng9 IVY Ng2-odometer library issue when compile with AoT #10

Open LanderBeeuwsaert opened 4 years ago

LanderBeeuwsaert commented 4 years ago

See the ticket on the angular github as well: https://github.com/angular/angular/issues/35203

Affected Package The issue is caused by package @angular/.... Is this a regression? Sort of, it's because of IVY + AoT + https://github.com/jmandreslopez/ng2-odometer

it works with NG8 + AoT

Description A clear and concise description of the problem... Sooooo, upgrade to NG9 took some time but eventually I got there. Development works when I use the settings: "optimization":false, "sourceMap":true, "extractCss":true, "namedChunks":false, "aot":false, "extractLicenses":false, "vendorChunk":false, "buildOptimizer":false,

When I set "aot":true It doesn't

error message is: ERROR in node_modules/ng2-odometer/dist/index.d.ts:3:23 - error NG6005: Ng2OdometerModule.forRoot returns a ModuleWithPro viders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors. 3 static forRoot(): ModuleWithProviders;

I already have an old issue open on the library in respect to IVY: jmandreslopez/ng2-odometer#8 but nobody's home it seems ;).

I seem to remember the angular team was trying to be compatible with as much libraries as possible for IVY, not sure if that is still relevant/the case.

On first look, IVY is crazy fast in comparison to viewEngine for our application. Well done!

Best regards,

Lander

arin-pang commented 4 years ago

I forked this repo and fixed this issue. (https://github.com/arin-pang/ng9-odometer)

muzyka-viacheslav commented 2 years ago

I forked this repo and fixed this issue. (https://github.com/arin-pang/ng9-odometer)

You are a saver man, thanks for this