As a beginner in angularjs, I am working on creating a login form that connects to a REST API URL when the user submits the form.
http://XXX/XXX/index.php/report/login/format/json
Using PostMan REST client to configure the URL works fine!
However, when attempting to configure this URL in angularjs and registering it as a service like shown below:
User = $resource('http://xxx/xxx/index.php/report/login/format/json',{},
{
query: { method: 'GET', isArray: true },
create: { method: 'POST' }
});
User.create({email: user.email,password: user.password});
I have also tried enabling CORS on the server side with no success.
Unfortunately, I receive a 404 error and the values are not being posted.
Any assistance would be greatly appreciated.