Home » Php » AngularJS works on one domain, but not another

AngularJS works on one domain, but not another

Posted by: admin October 26, 2017 Leave a comment


I have been developing an AngularJS App at one domain, say experiment.example.com/application, then copying it over to another, say schooldomain.com/application. I’ve done this in stages once I have an element working. All has been going well, but as the application has got larger, I’ve found that things don’t always work on the school domain.

Below is one of many functions which ‘get’ data from data-process.php, all others of which work on both sites.

I have tried playing with permissions, and have read this but not sure if relevant.

My question is, what steps should I follow to resolve this. Thanks for any help.

    $scope.oneQ = function(title,attempt,csv,status) {
    $scope.quizinfo = "";
    $http.get('inc/data-process.php?v=oneQ', {params:{title:title,attempt:attempt,csv:csv,status:status}}).then(function(response) {
        $scope.quizinfo = response.data.records;