Calling PHP with AngularJS/AJAX/JavaScript
<p>I am very new to PHP and AJAX so please advise if this method is actually even appropriate.</p>

<p>Basically what I am looking to do is populate a .JSON with data from a Microsoft SQL Server. I am using a PHP file to set up the connection which will also populate the .JSON file which can then be read from to populate a ionic list. I am able to read from a .JSON no problem but the issue comes when I call the PHP file. </p>

<p>I am not sure what the best method is for calling it. I've tried AJAX, AngularJS and JavaScript methods but it seems that when it comes to accessing the PHP file they fail but without exception. </p>

<p>This is the code that was able to trigger the .success</p>

<pre><code>angular.module('someApp').controller('someCrtl', function ($scope, $http) {
$http.get("app/dataLink.php").success(

    function phpCall(data) {        
    $scope.info= data;            
}
)});
</code></pre>

<p>Note that $scope.info = data; is not what i want to do. What this controller should do is call the php which will populate the .JSON then read from that same .JSON to populate $scope.info</p>

<p>What i can see is that it never actually $http.get the PHP document (I put a breakpoint within it and it was never triggered) but it still continues into .success without exceptions. </p>

<p>I hope that this is enough to go on.</p>

<p>Any other relevant info might be:</p>

<ul>
<li>Using Visual Studio 2015 Enterprise</li>
<li>Using AngularJS with Ionic</li>
<li>Using PHP Tools for Visual Studio by Devsense</li>
</ul>

<p>Any advice would be much appreciated,</p>

<p>Thanks. </p>