I am trying to call a file that is in this path:
/assets/usuarios/initLogin.php
I run:
normograma > ng serve
and this runs on http://localhost:4200/
I get not found 404 error:
return new Promise((resolve, reject) => {
var headers;
headers = new Headers({
'Content-Type': 'application/json',
'Authorization': token
});
const options = new RequestOptions({
headers: headers
});
this.http.post("http://localhost/assets/usuarios/initLogin.php", {}, options)
.subscribe(response => {
try {
response = response.json();
resolve(response);
} catch (error) {
console.log('[api-274]', response);
reject(response);
}
}, fail => {
try {
fail = fail.json();
} catch (error) {
console.log('[api-108]', fail);
}
reject(fail);
});
});
Within the php code is the code that connects to a database that is in the cloud. what am I doing wrong?