The view for an overview (root.html) of MySQL data doesn't show data. Opening /php/overview.php however indicates that the data could be fetched correctly:
Connection to MySQL server successful. [{"Job_title":"flash","Job_id":"doggg"},{"Job_title":"ad34","Job_id":"teeee"}]
root.html
<table class="setup-table">
<tr>
<td>Job title</td>
<td>Job ID</td>
</tr>
<tr data-ng-repeat="campaign in campaigns">
<td>A {{campaign.Job_title}}</td>
<td>B {{campaign.Job_id}}</td>
</tr>
</table>
controller.js (Note that the alert "It WORKED (DELETE Later)" shows up, but the table in the view is empty:
ctr.controller
('RootCtrl', ['$scope', '$routeParams', '$http', function($scope, $routeParams, $http)
{
$http.get("php/overview.php")
.then(function successCallback(response){
console.log(response);
$scope.campaigns = response.data;
alert("It WORKED (DELETE ME)");
}
, function errorCallback(response) {
$scope.campaigns = "error in fetching data";
alert("DID NOT WORK ");}
)
;}
]);
overview.php
<?php
include_once('db.php');
$query = "SELECT Job_title, Job_id FROM campaign";
$result = $connect->query($query);
$data = array();
while ($row = mysqli_fetch_array($result,MYSQL_ASSOC)) {
$data[] = $row;
}
print json_encode($data);
mysql_close($connect);
?>
ng-view? Not much detail given regarding your problem$scope.$apply();?