We are trying to implement Ajax Remote data loading in Select2:-
$scope.configPartSelect2 = {
minimumInputLength: 3,
ajax: {
ur
Taken from select2's demo page:
Select2 will pass any options in the ajax object to jQuery's $.ajax function, or the transport function you specify.
Using JQuery 2+, I was able to successfully set OAuth 2.0 and Content-Type headers.
ajax: {
headers: {
"Authorization" : "Bearer "+Cookies.get('accessToken'),
"Content-Type" : "application/json",
},
}