zhaber / ng-bootstrap-datetimepicker

:calendar::clock2: Angular Bootstrap Date Time Picker
MIT License
149 stars 57 forks source link

Datetimepicker component is not compatible with Angular AoT (Ahead-of-time) compilation. #145

Closed mmorsky closed 6 years ago

mmorsky commented 6 years ago

Hi,

We're using the datetimepicker component in our application and it works nicely in our test/develop environment. However, when we try to deploy to production, or more specifically, try to use the Angular AoT feature, we get problems.

The problem seems to be that the component template uses some properties which are declared private (onDateChange and onTimeChange). This causes the build to fail when using the --aot flag, eg. ng build --aot

This is documented quite shortly and perhaps not so clearly in the docs.

I think this is a known issue in Angular, at least there's a lot of discussion on the subject on bug reports on the project, for example this one.

Have you ran into the same problem before? Or do you know if there's someway to solve this issue on our side (other than disabling the AoT)?

zhaber commented 6 years ago

I've removed private access modifier for now

mmorsky commented 6 years ago

Great, thanks a lot for the quick fix! Do you have plans to publish this to npm soon, or how we could deploy this fixed version easily?

zhaber commented 6 years ago

Published a new npm version