Вопрос

I'm using AngularJS in a simple prototype app that uses Domino server on the back end.

When I do a seemingly simple call like this:

$http({ url: $scope.hrEventsPath, 
        method : "GET", 
        params : { 'readform' : '',
                   'eventid' : $scope.queryStringPairs.eventid,
                   'userid' : $scope.queryStringPairs.userid,
                   'login' : $scope.queryStringPairs.login } }).
            success(function(data, status) {
                // happy stuff
            }).
            error(function(data, status) {
                // error handling stuff
            });

It seems that Angular puts all the params in alphabetical order when the call is made.

Therefore, the readform parameter is not the first parameter, eventid is, and the Domino server chokes. (This happens whether or not 'readform' has a value)

Regardless of Domino and its configuration, is there a way to for a sort the order in Angularm or should one use another approach?

Thanks in advance.

Это было полезно?

Решение

Use an array of single objects, then the object won't have a chance to switch itself around.

[ {}, {}, {} ]
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top