Re: AngularJS

Tim Fathers <[email protected]>
Newsgroups gmane.comp.systems.as400.web
Message-ID <FRYP281MB0422292DCD426CE21B829BA5E3EF9@FRYP281MB0422.DEUP281.PROD.OUTLOOK.COM>
You definitely shouldn't be using AngularJS, it's long since been deprecated by Angular (no JS), which is now some 12 versions further on than the original. It's also alot nicer to use and with its CLI, you can get a skeleton project up and running quite quickly, although after that, the learning curve is steep!

Get Outlook for Android<https://aka.ms/AAb9ysg>

________________________________
From: WEB400 <[email protected]> on behalf of Jay <[email protected]>
Sent: Monday, August 2, 2021 6:51:25 PM
To: [email protected] <[email protected]>
Subject: [WEB400] AngularJS

I'm using AngularJS to replace a CGIDEV2 application. So far, it is not working out with the time I've wasted on it.

The $http post doesn't want to pass parms to the RPGLE routines. I can see the routine trying, but the POST variables aren't there.

I have the following:
var data = {
pagectl:"LOGIN",
pagesub1:"VALIDATE",
username: username,
password: password
};
var config= {
headers: {"Content-Type": "application/json"}
};
$http( { url:'/cgi-bin/wqa0100c',
method:"POST",
headers: {"Content-Type": "application/json"},
data: data
}
)
.success(function(response) {
console.log(response);
if( response.status=="OK" ) {
smn=response.smn;
slname=response.name;
} else {
$rootScope.error=response.errmsg;
}
});

The data isn't seen by the RPGLE routine. I can call it from the webbrowser and pass parameters as a GET process, no issue.
The same chunk of code is running in production now with the CGIDEV2 processes and is access via AJAX.

Any ideas?
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.

-- 
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.