Gillardo / ngx-bootstrap-datetime-popup

Date and time picker using ngx-bootstrap library
MIT License
31 stars 14 forks source link

ng aot build fixes #6

Closed sn123 closed 6 years ago

sn123 commented 6 years ago

Doing ng build --prod fails and clicking on button in a form causes it to submit

sn123 commented 6 years ago

could you please push a new npm version? Current one is not usable with aot builds, thanks!

Gillardo commented 6 years ago

Give me a sec

Gillardo commented 6 years ago

I have now released and published version 1.2.4. Hope this is ok

sn123 commented 6 years ago

1.2.4 works like a charm, thanks!

Gillardo commented 6 years ago

Np, thanks for PR

sn123 commented 6 years ago

Hey, there's still issue with AOT builds. Even though the aot build compiles fine now, If I run the app, I get "x" is not a constructor. I only get this error if I include the npm package, if I directly copy over the source files and include the module within the app itself, I don't get this error with aot runs.

Gillardo commented 6 years ago

your using angular-cli and the ng build command?

sn123 commented 6 years ago

Yes using cli and ng build –-prod which triggers an AOT build.

Gillardo commented 6 years ago

i have now converted my own site to use angular-cli. I will try and do a build shortly and see if i get the issue

sn123 commented 6 years ago

Sure thanks, I guess there’s an issue with metadata file generated for npm since including source works fine.


From: Gillardo notifications@github.com Sent: Wednesday, December 6, 2017 6:03:29 PM To: Gillardo/ngx-bootstrap-datetime-popup Cc: Sachin Nigam; Author Subject: Re: [Gillardo/ngx-bootstrap-datetime-popup] ng aot build fixes (#6)

i have now converted my own site to use angular-cli. I will try and do a build shortly and see if i get the issue

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Gillardo/ngx-bootstrap-datetime-popup/pull/6#issuecomment-349626187, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMnmncVXC53ojZV1m_ziFY8Bi92rHdNIks5s9omZgaJpZM4Q1_zN.

Gillardo commented 6 years ago

can you download 1.2.6 and try it? I have now moved to angular-cli and experienced the same problem. I have rebuilt the datetime library and then copied the code into my project locally and it worked. So if you can download it via npm, you should now not get the same problem

Gillardo commented 6 years ago

make that 1.2.7. I have tried it from npm and all working!!

sn123 commented 6 years ago

Thanks, sorry haven’t been near my system today. Will confirm tomorrow and let you know. By the way, what was the issue?

Gillardo commented 6 years ago

you can now use the component via npm and it wont error when using --aot