ui-select2 icon indicating copy to clipboard operation
ui-select2 copied to clipboard

ngModel not working in multiple with ajax.

Open arjundas opened this issue 9 years ago • 0 comments

here is my view code :

<div multiple ui-select2="select2Options" id="qwe" ng-model='variable1' name="" class="text" placeholder="Placeholder Text"></div>

and in controller :

app.controller('someCtrl', function($scope, $stateParams, $http, $location, $rootScope, $url,  $compile, $tableService){

        $scope.variable1 = [];

        var lastResults = [];

        $scope.select2Options = {
            allowClear : true,
            ajax : {
                url: 'someUrl',
                dataType: "json",
                type: "POST",
                quietMillis: 500,
                data: function(term, page) {
                    return {
                        json: JSON.stringify(lastResults),
                        page_limit: 10,
                        page: page,
                        str: term
                    };
                },
                results: function(data, page) {
                    var more = data.to < data.total;
                    return {results: data.data, more: more};
                }
            }
        };
    });

but variable1 is not update on select of any tag. This is worked without multiple but not worked with multiple. any help please?

arjundas avatar Feb 18 '15 10:02 arjundas