AngularJS + autocomplete ($watch problem?)

1,612 views
Skip to first unread message

Nicolas Clairon

unread,
May 23, 2012, 6:05:12 AM5/23/12
to ang...@googlegroups.com
Hi,

I'm trying to use Twitter Bootstrap's typeahead feature on top of AngularJS. Everything works well with a static array http://jsfiddle.net/eSmkF/1/ but I want my auto-complete be dynamic by fetching some data from the server.

I try to emulate it with with $watch. I can see the console result but the widget is not updated : http://jsfiddle.net/ffTgc/1/

What's wrong ?

N.

Nicolas Clairon

unread,
May 23, 2012, 8:09:59 AM5/23/12
to ang...@googlegroups.com
I made another example of dynamic data (maybe much easier to understand the issue) : http://jsfiddle.net/DNjSM/3/

Nicolas Clairon

unread,
May 24, 2012, 5:25:25 AM5/24/12
to ang...@googlegroups.com
I finally found a solution (it wasn't an angular issue but a typeahead one) http://jsfiddle.net/DNjSM/17/
Reply all
Reply to author
Forward
0 new messages