ng2-ui / datetime-picker

Angular2 DateTime Picker
https://ng2-ui.github.io/#/datetime-picker
MIT License
121 stars 62 forks source link

Can't find template #1

Closed flaprogrammer closed 8 years ago

flaprogrammer commented 8 years ago

I didn't configure systemjs.config.js, cause I used angular2-webpack-starter. So I imported module with import {DateTimePickerDirective} from "ng2-datetime-picker";

Everything is ok, but when I focus on input, it throws exception

http://localhost:3000/datetime-picker.html 404 (Not Found) Unhandled Promise rejection: Failed to load /datetime-picker.html ; Zone: angular ; Task: Promise.then ; Value: Failed to load /datetime-picker.html

And datepicker doesn't shows Maybe I'm doing something wrong?

allenhwkim commented 8 years ago

I do not know about webpack, but I think we need to tell the system where to search.

Normally it's from node_modules/ng2-datetime-picker, but if not, then it must be somewhere

and it should not look for http://localhost:3000/datetime-picker.html, and it should look for something like node_modules/ng2-datetime-picker/dist/datetime-picker.html

I would really appreciate someone who knows about webpack can help me and you.

I am thinking of using inline templating, which does not use templateUrl nor styleUrls if the problem continue happening.

flaprogrammer commented 8 years ago

Yes, inline templating solved this problem, thanks =) But now I see new issue, when I click to picker, it closes. So I can't change the month on calendar. And in the demo link http://embed.plnkr.co/32syXF/ it's not the picker, so I can't know how it should work

allenhwkim commented 8 years ago

Do you use the recent version of ng2-datetime-picker? The earlier version had that issue.

npm update ng2-datetime-picker

Meanwhile, I will update the plunker. I put [ng2-auto-complete](https://github.com/jsvalley/ng2-auto-complete] instead of the right one.

allenhwkim commented 8 years ago

This is a new plunker, http://plnkr.co/edit/lbNRAh?p=preview

flaprogrammer commented 8 years ago

Yes, I use 0.1.8 of ng2-datetime-picker version, Angular version rc.1 OS X El Capitan, Chrome 51

allenhwkim commented 8 years ago

Sorry, I realized that it's a bug that we currently have. Sorry about that. I will make a fix within a day

allenhwkim commented 8 years ago

This has been fixed and released with 0.1.9. Please verify the fix is correct

flaprogrammer commented 8 years ago

Now it's ok! Thank you! Could you also inline your css and html?

allenhwkim commented 8 years ago

inline css and html is done using ng2-inline-template

flaprogrammer commented 8 years ago

You're great! Thank you