These are chat archives for indrimuska/angular-moment-picker

17th
May 2017
Tomas Laskauskas
@thfrlw
May 17 2017 06:04
Screen Shot 2017-05-17 at 08.58.15.png
I dont know if I could've gone more straightforward about issue : )
Tomas Laskauskas
@thfrlw
May 17 2017 06:43
and I think I talked too fast abut better performance, tho, i made this simple representation of my situation with moment-picker https://plnkr.co/ehMdIniTCSvHUeSaFPYS, if you open performance tab on chrome dev tool and record whats happening while toggling ng-if... I thought not wrapping picker in html elements (like you did: appending it to body) was key to performance, but its something else.
Indri Muska
@indrimuska
May 17 2017 17:05
If you had so many instance of any directive that should be rendered together at one time, you should consider using ng-show instead of ng-if, so that all those instances won’t be destroyed and recreated again, but just hidden and shown on demand.
Tomas Laskauskas
@thfrlw
May 17 2017 19:12
Yes man, I certainly only use ng-hide, but just for example I used ng-if, cause I use ui router, and my routes have changing number of picker fields, from 2 to ~20 and I get lag route switch
When swirchi
When switching routes. (Sorry was replying from mobile and msgs posted every time screen turned off)
Im pushing this just to know if there is anything to be done, to make it more performantant in my scenario, cause i develop an input formatter to use instead of this picker and it did not introduce that kind of loading time. But I'd rather use this picker so Ill find some way to deal with issue if theres nothing to be done here.
Cheers
Tomas Laskauskas
@thfrlw
May 17 2017 19:18
What about picker appearing out of screen? Did my screenshot let you understand what kind issue is it?
About loading time: could it be because you are adding class, thus modifying Dom a little? Cause it got better since you made it append to body.
evanwellens
@evanwellens
May 17 2017 19:37
Looking to use this awesome control for time entry. Is there a way to hide the date ?
Indri Muska
@indrimuska
May 17 2017 19:45
@thfrlw - the fact that the picker goes out of screen is a bug, can you please track it on GitHub? For the loading time, I think that a little improvement could be done for the initialization phase (e.g. removing transcludion and compiling the template without appending it), but anyway I don’t think you'll gain so much.
@evanwellens - you should use show-header option
Indri Muska
@indrimuska
May 17 2017 20:02
@thfrlw, bug fixed in the repo. It will be available in the next release.