Lightweight jquery-ui wrapper

417 views
Skip to first unread message

zdam

unread,
Mar 7, 2012, 11:40:37 PM3/7/12
to ang...@googlegroups.com
I've been thinking about easy ways to use 3rd party libraries such as jquery-ui.

Current examples that attempt to use widgets/directives to use jquery-ui or twitter bootstrap all look hard, and are in various states of in-progress or unfinished.  I wonder if that is because writing them is quite tricky?

Anyway, the approach I am taking in this fiddle http://jsfiddle.net/zdam/vGjXH/ is to use a service that acts a thin wrapper to the 3rd party library, and then your controller invokes this wrapper service passing it the required parameters.

The example show 2 approaches, the first uses html in the markup but hidden, the second tries to loada template, but this does not work yet :(

Thoughts?

Cheers, Adam.

cambiata

unread,
Mar 8, 2012, 1:51:10 AM3/8/12
to ang...@googlegroups.com
Hmm... It seems that the datePicker doesn't work correctly until the html dialog is shown at least once - the jq-ui datePicker dialog isn't shown. Same behaviour on FF10 and Chrome.

Dan Doyon

unread,
Mar 8, 2012, 10:44:11 AM3/8/12
to ang...@googlegroups.com
I've felt same way about this and have had success taking simplistic approach to wrapping jq plugins . When I have time I'll see about posting some fiddles

Dan

Sent from my iPhone

On Mar 7, 2012, at 10:51 PM, cambiata <jona...@gmail.com> wrote:

Hmm... It seems that the datePicker doesn't work correctly until the html dialog is shown at least once - the jq-ui datePicker dialog isn't shown. Same behaviour on FF10 and Chrome.

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/OvRljK1irG8J.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.

zdam

unread,
Mar 8, 2012, 4:30:00 PM3/8/12
to ang...@googlegroups.com
Fixed, I now show the datepicker when I create it.

cambiata

unread,
Mar 9, 2012, 1:13:12 AM3/9/12
to ang...@googlegroups.com
Great!

cambiata

unread,
Mar 10, 2012, 1:34:45 AM3/10/12
to ang...@googlegroups.com
@Adam:
Added your example to the fiddles/gists page (https://github.com/angular/angular.js/wiki/JsFiddle-Examples/_edit)
Would be great to have the dialog/template problem solved..!

@Dan:
Looking forward to seeing your approach!

Regards / Jonas


Reply all
Reply to author
Forward
0 new messages