Skip to content Skip to sidebar Skip to footer

How To Get Data Of Php Web Api Json From Server To Using Angularjs.?

When I am saving this json in my local computer and use it in my AngularJs script. It's work fine. But when I am using direct server to this it is not working - why? What is missin

Solution 1:

First of all i am Hoping This plunker will be helpful to you. As i cross origin issues i save the response in a json file and did this work around like

$http.get('j1.json').success(function(response){ //make a get request to mock json file.$scope.data = response; //Assign data recieved to $scope.data
            console.log($scope.data);
        })

Let me know if you have any queries on this

I used your json and simply displayed id and name of your data using ng-repeat HERE......let me know in which way you want to show this in your html like simple data or you want to show then in a drop down ????

Post a Comment for "How To Get Data Of Php Web Api Json From Server To Using Angularjs.?"