Executing a specific order for passing parameter data in AngularJS through a $http.get request

In a simple prototype app utilizing AngularJS with a backend server powered by Domino, I encountered an issue when making a 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 arranges all the parameters in alphabetical order before sending the request. This causes issues with the Domino server as it expects the 'readform' parameter to be first, not 'eventid'. (Even if 'readform' is empty)

Is there a way to control the order of parameters in Angular or should I consider a different approach regardless of Domino's configuration?

Thank you for your assistance.

Answer №1

To prevent the object from changing positions, utilize an array consisting of individual objects.

[ {}, {}, {} ]

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How can I assign an undefined service response to a variable in an Angular controller?

I am currently working with a factory in my code. I call a service, retrieve the response, pass it to the controller, and then attempt to store the response in a variable. However, I am encountering an issue where the variable ends up being undefined. app ...

Issue with form submission

I'm experiencing an issue with a form on my website where users can share an email. The form is supposed to pop up and allow users to send an automated subject and message to a friend. However, when I try to submit the form, the browser displays a 404 ...

What is the best way to determine the nearest vertex to a given 3D point?

https://i.sstatic.net/Ooh8W.png Objective: I am aiming to identify the closest vertex to the clicked point. Components Needed: Perspective camera Icosahedron geometry (applied basicmeshmaterial with wireframe) Rotating geometry Raycaster Current Clic ...

jQuery - Navbar with both horizontal and vertical orientation

I'm new to JavaScript and jQuery, and I'm looking to create a vertical nav/slider that follows the cursor when hovering over horizontal navbars links to reveal sub-links, essentially creating a dropdown menu effect. While I don't expect any ...

The quantity addition and subtraction function is malfunctioning

I have implemented a quantity plus/minus feature in HTML which is embedded from a jQuery script provided below. jQuery.ajax({ type: "POST", url: "http://ayambrand-com-my-v1.cloudaccess.host/index.php?option=com_echa ...

The data displayed by the jQuery alert(data) method cannot be properly rendered within a div element

Within my textarea with the ID "wraped," there are HTML codes that I need to send to fsjquery.php using AJAX GET method in order to save the data into an SQL database. Prior to sending the data, I am removing the IDs from the HTML codes within the textare ...

React - toggle visibility of element when clicked

I have a question regarding React hooks and two components I am using: Curtain Navbar Below is the code for the Curtain component: function Curtain(){ return( <div className="curtain__div"> <ul className=&q ...

Cyber-election platform

Currently running an election website with PHP Seeking guidance on enabling multiple users to access from a single browser simultaneously Implemented a database column where logging in sets the value to 1 and logging out sets it to 0 Encountering an iss ...

The website loads successfully in the browser and with curl, but it consistently times out when accessed

Having trouble getting the Geobytes ajax city search to function on my server. Despite copying and pasting the code directly from , the GetJSON routine is not executing properly; neither the .done(), .error() functions, nor the callback. Upon inserting an ...

Ways to verify if a div is empty following an ajax request

When trying to load a php page into a div, I encountered an issue where the content of the div appeared empty. Despite attempting various methods to check if the div contained any html content after loading, I was unable to find a solution. ...

extension that interacts with another extension via AJAX

Has anyone tried using a Chrome extension to ajax another Chrome extension? I attempted it but was unsuccessful. I am trying to ajax it through jQuery in order to retrieve the current Chrome theme background. When I tried, I encountered the following erro ...

Setting up the Environment for Eslint within a current project: A Step-by-Step Guide

Encountered an error while building module (from ./node_modules/eslint-loader/index.js): Error: .eslintrc.js: Unknown key "es2021" in the environment at /Users/artic/Documents/RestroWorld/HRConsultancy/node_modules/eslint/lib/shared/config-valida ...

Issue with cross-browser compatibility: jQuery fails to display the first item in the select dropdown

Here is a select box found within a search form: <select name="searchFor" id="searchFor"> <option name="option0" value="Choice">Pick one</option> <option name="option1" value="person">Person</option> <option name="optio ...

Find and replace problem with findOneReplace

I am looking to locate a specific document in my database and update it with a new name and key information. Below is the Schema I'm working with: const Schema = mongoose.Schema; const vampireSchema = new Schema({ name: { type: String, required: t ...

Utilizing Angular 2 for Integration of Google Calendar API

I recently attempted to integrate the Google Calendar API with Angular 2 in order to display upcoming events on a web application I am developing. Following the Google Calendar JavaScript quick-start tutorial, I successfully managed to set up the API, inse ...

Stopping AngularJS operations after a user logs off in ASP.Net MVC can be achieved by implementing a proper session management

On my request page, all users have access to view and edit their own requests using various AngularJS functions. However, a problem arises when a user logs out on another page but the Angular functions on the request page continue to work until the page ...

Accessing the parent scope from a child controller in AngularJS

My controllers are set up using data-ng-controller="xyzController as vm" I am facing an issue with parent/child nested controllers. While I can easily access parent properties in the nested HTML using $parent.vm.property, I am struggling to figure out how ...

Using Angular router with Bootstrap collapse to create interactive and dynamic web

I am currently using Bootstrap collapse as a reference from http://getbootstrap.com/javascript/#collapse. Given that I am using Angular router, how should I define the href attribute for the collapse element on the localhost/#/flow page? <a class="acc ...

Sending data to a Higher-Order Component

Within my codebase, there exists a higher-order component named FormBuilder, structured as follows: const FormBuilder = (WrappedComponent) => { return class HOC extends React.Component { clearForm() { // ... } render() { return ( ...

Confirm the contents of a form retrieved through ajax

Let me explain the issue I am facing. I have created an HTML page with a simple form and some jQuery code for validation. This is how the page looks: <html> <head> <title></title> <script src="jquery-1.7.min.js" type="text/jav ...