I'm playing around with Angular JS and have a small blog feed where I have an input field with which to filter the displayed contents. Now, I've built my own "buzz cloud" (or whatever the word is), and am trying to implement it so that when one of the words are clicked, the updating of the input field will make the list filter correctly.
But, when I set the value of my input field, the change event on it is not triggered. So I try triggering it manually with jQuery - still doesn't work.
Code below:
<aside>
<div class="filters">
Search: <input id="searchField" ng-model="query">
</div>
<div class="buzz">
<h3>Buzz</h3>
<li ng-repeat="(key, value) in buzz" class="thumbnail">
<a href="" style="font-size:{{value*10}}px" onclick="$('#searchField').val('{{key}}'); $('#searchField').trigger('change'); ">{{key}}</a>
</li>
</div>
</aside>