ivaynberg's select2 has this great feature query
( a property of the options
object that gets passed to the call to select2({})
)
The trouble I'm having is using this feature with angular-ui's ui-select2 implementation.
I wanna do something like:
$scope.select2Options = {
query: function(options) {
$http({
method: 'GET'
url: '/some/url'
params: options.term
})
.success( function(result, status, headers, config) {
// do some parsing here to get results looking right
options.callback({result: result});
});
}
like..I've not been able to get something like this working - query never gets called - and when I do as suggested on ivaynberg's github page and change the <select>
to an <input type="hidden" ... />
I see nothing.