I'm trying to tie up a PHP backend (MySQL database) and an AngularJS front end. I've spend about two days reading through tutorials to much frustration and time.
Basically I'm using the line:
$http.get('/angular/index.php').success(function (data) {
console.log(data);
});
Which makes the following request:
GET http://localhost:9000/angular/index.php 404 (Not Found)
Problem is the service is only accessible from:
angular/index.php
How do I change/use Angular to send requests to local data storage/database ??
RESTful settings
Virtual host:
<VirtualHost *:9000>
ServerAdmin webadmin
DocumentRoot "/Users/biggles/Sites/angular/app/ajax"
ServerName angular
ServerAlias angular
ErrorLog "/private/var/log/apache2/angular-error_log"
CustomLog "/private/var/log/apache2/angular-access_log" common
</VirtualHost>
hosts file:
127.0.0.1 angular